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.
標簽: represented integers group items
上傳時間: 2016-01-17
上傳用戶:jeffery
加密程序源代碼* A 變成 C,B 變成 D,a 變成 c,b 變成 d,Y 變成 A, * z 變成 b,以此類推。非字母字符不變。
上傳時間: 2013-12-28
上傳用戶:stvnash
此工具書是一般常用的到的數學工具書,內容詳細介紹matlab指令的各種用法,從基本的概述、初探matlab、二維平面繪圖、三維立體繪圖、數值運算與其它應用、影像顯示與讀寫、動畫製作、握把式圖形與GUI、GUIDEGUI設計環境、矩陣的處理與運算、字元與字串、多維陣列、異質陣列、結植陣列、稀疏矩陣、matlab的運算元、m檔案、程式流程控制、程式除錯、檔案輸出及輸入、程式計時、程式碼與記憶、應用程式介面、線性代數、多項式的處理、一般數學函數、內插法、曲線擬合與迴圈、常微分方程式…等,是非常好用的工具書。
標簽:
上傳時間: 2016-08-24
上傳用戶:ynsnjs
,一個JSP寫的簡單的網上書店的程序,還蠻實用的喔
上傳時間: 2016-11-06
上傳用戶:gdgzhym
數字音樂盒 (1) 硬件電路中用P1.0~P1.7控制按鍵,其中P1.0~P1.3掃描行,P1.4~P1.7掃描列。 (2) 用P0.0~P0.7,P2.0~P2.7控制LED,其中P0.0~P0.7控制七段碼a,b,c,d,e,f,g,用P2.0~P2.7為數碼管位選信號。 (3) 用,P2.0~P2.2作為LCD的RS,R/W,E的控制信號。用P0.0~P0.7作為LCD的D0~D7的控制信號。 (4) 用P3.7口控制蜂鳴器(J2,J4斷開,J3短接)。 (5) 電路為12MHZ晶振頻率工作,起振電路中C1,C2均為30pf。
上傳時間: 2016-12-03
上傳用戶:ruixue198909
用java寫的時間片輪轉法,分為幾個文件,用的是txt保存代碼。
標簽: java
上傳時間: 2013-12-10
上傳用戶:磊子226
設計一個表示直角坐標系上點的位置的Location類,計算兩個坐標系上點對象A和B之間的距離。要求用成員函數Distance()求距離。在main()中,分別用對象、指針、引用三種方法定義和使用對象A和B。
上傳時間: 2017-02-10
上傳用戶:zhaoq123
漢諾塔!!! 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
標簽: the animation Simulate movement
上傳時間: 2017-02-11
上傳用戶:waizhang
sbit CS = P1^0 sbit SCK = P1^6 sbit SIN = P1^7 sbit SOUT = P1^5 sbit WP = P1^1 void XReady(void) void XSendByte(unsigned char b) unsigned char XGetByte(void) void XWriteEn(void) void XWriteDis(void) unsigned char XReadStatus(void) void XWipPoll(void) void XWriteStatus(unsigned char b) void XReadData(unsigned char *m,unsigned char x,unsigned char n) void XWriteData(unsigned char *m,unsigned char x,unsigned char n) #define XResetDog() {CS=0 CS=1 } void InitX5045(void)
上傳時間: 2014-01-17
上傳用戶:lijinchuan
將魔王的語言抽象為人類的語言:魔王語言由以下兩種規則由人的語言逐步抽象上去的:α-〉β1β2β3…βm ;θδ1δ2…-〉θδnθδn-1…θδ1 設大寫字母表示魔王的語言,小寫字母表示人的語言B-〉tAdA,A-〉sae,eg:B(ehnxgz)B解釋為tsaedsaeezegexenehetsaedsae對應的話是:“天上一只鵝地上一只鵝鵝追鵝趕鵝下鵝蛋鵝恨鵝天上一只鵝地上一只鵝”。(t-天d-地s-上a-一只e-鵝z-追g-趕x-下n-蛋h-恨)
上傳時間: 2013-12-19
上傳用戶:aix008