We have a group of N items (represented by integers from 1 to N), and we know that there is some total order defined for these items. You may assume that no two elements will be equal (for all a, b: a<b or b<a). However, it is expensive to compare two items. Your task is to make a number of comparisons, and then output the sorted order. The cost of determining if a < b is given by the bth integer of element a of costs (space delimited), which is the same as the ath integer of element b. Naturally, you will be judged on the total cost of the comparisons you make before outputting the sorted order. If your order is incorrect, you will receive a 0. Otherwise, your score will be opt/cost, where opt is the best cost anyone has achieved and cost is the total cost of the comparisons you make (so your score for a test case will be between 0 and 1). Your score for the problem will simply be the sum of your scores for the individual test cases.
標(biāo)簽: represented integers group items
上傳時(shí)間: 2016-01-17
上傳用戶:jeffery
一個(gè)MATLAB範(fàn)例,可以用來(lái)計(jì)算分形盒維度
標(biāo)簽: MATLAB
上傳時(shí)間: 2016-03-16
上傳用戶:星仔
用C#實(shí)現(xiàn)能產(chǎn)生PDF格式文件的源碼,對(duì)於想要開(kāi)發(fā)類似acrobat reader的功能軟件,很具參考價(jià)值
標(biāo)簽: 格式文件
上傳時(shí)間: 2016-07-31
上傳用戶:tfyt
目前網(wǎng)路流行的網(wǎng)頁(yè)遊戲(travian),配合firefox排程外掛,可以協(xié)助玩家計(jì)算建築物排程,本程式為javascript+xml方式,適合ajax初學(xué)者使用學(xué)習(xí),請(qǐng)務(wù)必掛於伺服器中才能穩(wěn)定執(zhí)行
上傳時(shí)間: 2016-08-05
上傳用戶:ls530720646
1. Learning NS Website (中文,有介紹Unicast Routing) 2. 華玄明網(wǎng)際網(wǎng)路實(shí)驗(yàn)室 - NS2 討論區(qū) (臺(tái)灣NS2討論區(qū)) 3. NS仿真軟件 (中國(guó)大陸NS2討論區(qū)) 4. The Network Simulator: Contributed Code (一些研究人員所貢獻(xiàn)的程式碼,這些程式碼並沒(méi)有包含在NS2原本的程式碼內(nèi)) 5. The Network Simulator: Building Ns (介紹如何安裝NS2) 6. NsNam Site Search (有關(guān)於NS和NAM的搜尋引擎)
上傳時(shí)間: 2016-11-03
上傳用戶:huangld
這是一個(gè)求數(shù)獨(dú)遊戲的m-file 在matlab的命令窗口 鍵入>> sudo7 或者run sudo7 的m-file 之後在 9x9 的方格內(nèi) 填入 數(shù)獨(dú)的問(wèn)題 按下 "計(jì)算是否有解" 的功能鍵 若不是存在多組的解,則可以 按下 "顯示結(jié)果" 的功能鍵, 也可以載入作者測(cè)試的"date1"或"date2" 但不可載入及修改"condition"
標(biāo)簽: m-file sudo7 matlab gt
上傳時(shí)間: 2016-11-18
上傳用戶:waizhang
漢諾塔?。。? Simulate the movement of the Towers of Hanoi puzzle Bonus is possible for using animation eg. if n = 2 A→B A→C B→C if n = 3 A→C A→B C→B A→C B→A B→C A→C
標(biāo)簽: the animation Simulate movement
上傳時(shí)間: 2017-02-11
上傳用戶:waizhang
中文自然語(yǔ)言處理相關(guān)程式,包括中文字頻統(tǒng)計(jì)及Jensen-Shannon Divergence計(jì)算程式,並包含古典文獻(xiàn)範(fàn)例
標(biāo)簽: 程式
上傳時(shí)間: 2014-11-27
上傳用戶:熊少鋒
將魔王的語(yǔ)言抽象為人類的語(yǔ)言:魔王語(yǔ)言由以下兩種規(guī)則由人的語(yǔ)言逐步抽象上去的:α-〉β1β2β3…βm ;θδ1δ2…-〉θδnθδn-1…θδ1 設(shè)大寫(xiě)字母表示魔王的語(yǔ)言,小寫(xiě)字母表示人的語(yǔ)言B-〉tAdA,A-〉sae,eg:B(ehnxgz)B解釋為tsaedsaeezegexenehetsaedsae對(duì)應(yīng)的話是:“天上一只鵝地上一只鵝鵝追鵝趕鵝下鵝蛋鵝恨鵝天上一只鵝地上一只鵝”。(t-天d-地s-上a-一只e-鵝z-追g-趕x-下n-蛋h-恨)
上傳時(shí)間: 2013-12-19
上傳用戶:aix008
[Damerau–Levenshtein distance] vb.net程式碼,內(nèi)含兩Function,一個(gè)計(jì)算距離,一個(gè)計(jì)算相似度。
標(biāo)簽: Levenshtein distance Damerau net
上傳時(shí)間: 2013-12-15
上傳用戶:nanshan
蟲(chóng)蟲(chóng)下載站版權(quán)所有 京ICP備2021023401號(hào)-1