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
UCS (Ultra Corba Simulator) is one more powerful corba client/servant simulator tool than other similar products(e.g. Telcopro s MtSim, or OpenFusion s Corba Explorer, or eaiBridge s CAST). It doesn t need idl-related helper class or IR service.
標簽: Simulator simulator powerful servant
上傳時間: 2016-01-17
上傳用戶:hustfanenze
由三星的2442修改而來,正確引導eboot,請注意用三星公版的硬件配置,具體可以參考QQ2440,因為我在些平臺上跑過,具體操作 1.target settings : post-linker:選擇為 ARM fromELF 2.ARM assembler與 ARM c Compiler 的 architecture or processor 選擇為:ARM920T 3.ARM linker的 output:RO base為 0x00000000 (當仿真時為:0x30000000),layout的 object/sysmbol:為2440init.o section:Init 4.ARM fromELF 的 output:format:plain binary , output file name:nboot.bin 下面為全部源碼,注意用ADS編譯 2442addr.h 2442addr.inc 2442init.s 2442lib.c 2442lib.h 2442loader-1208.c 2442slib.h 2442slib.s Def.h k9s1208_s.s Memcfg.inc Nand.h Nand_mini.c Option.h Option.inc
標簽: post-linker settings target eboot
上傳時間: 2016-05-06
上傳用戶:moshushi0009
基于LPC2148的U盤實現,實現U盤的基本功能,上傳速度2.2Mb/S,下載1.2Mb/s
上傳時間: 2016-05-07
上傳用戶:waitingfy
本程序執行后,創建一個能夠加載文字的面板,文字的內容是本地主機的IP地址的動態顯示。跑馬燈文字的大小和跑馬燈文字顯示的速度都可以在GatutTextCrawler.html文件里通過參數進行設置。 編程思路:首先,本練習因為要制作偵測IP的跑馬燈的實例,所以首先要生成程序界面:在函數public void init()中,首先通過語句s = getParameter("fontSize")和fontSize = s != null ? Integer.valueOf(s).intValue() : 12設置文字字體大小,然后進行字體設置和顯示速度設置,最后通過語句msgText = getParameter("preText")得到GatutTextCrawler.html文件中的字符串值。然后,得到主機IP地址,首先通過函數adds = InetAddress.getLocalHost().toString()得到主機的IP地址,最后在更新屏幕函數public void update(Graphics g)中通過實現跑馬燈效果。
標簽: 程序
上傳時間: 2016-06-06
上傳用戶:miaochun888
CELP (CELl Processing) is a functional programming package for Matlab. It is often better to use FP instead of loops: - it s more compact - it s more clear.
標簽: programming Processing functional package
上傳時間: 2013-12-19
上傳用戶:netwolf
MSP-FET430P140 Demo - USART0, SPI Interface to HC165/164 Shift Registers Description: Demonstrate USART0 in two-way SPI mode. Data are read from an HC165, and same data written back to the HC164. ACLK = n/a MCLK = SMCLK = default DCO = UCLK0 = DCO/2 * USART0 control bits are in different SFR s from other MSP430 s *
標簽: Description Demonstrate Interface Registers
上傳時間: 2013-12-28
上傳用戶:懶龍1988
根據曼徹斯***的編碼原則(參見本刊2001年第一期《一種采用曼碼調制的非接觸IC卡讀寫程序編制》),非接觸ID卡采用上升沿對應著位數據“0”,下降沿對應著位數據“1”,微控制器通過檢測U2270B輸出數據位的跳變來實現對曼徹斯***的譯碼。在現實工作中,數據信號會受到調制、解調、噪聲各種效應的影響,其上升沿和下降沿存在抖動,可采用鍵盤消抖的辦法來消除抖動的影響。根據非接觸ID卡64位數據循環發送以及其數據緒構特點,即數據流中第64位為“0”,第1位至第9位為“1”。據此,將“0111111111”作為讀數據的起始標識,如圖2所示。在確定了數據起始標識后,采用延時大于0.5T采樣數據位的方法,如圖3所示,來避開曼徹斯***編碼中的空跳對數據譯碼造成的影響,簡化了譯碼程序。 通過實驗得到:480μs≤1T≤520μs,220μs≤0.5T≤280μs,由此取Tnext=300μs。為了便于對讀出數據進行奇校驗,讀出數據每5位作為一個字節。因此確定起始標識和讀取數據對時鐘有嚴格要求,所以尋找起始標識和讀取數據部分程序采用匯編語言編寫。數據讀以后,根據前面所提到的非接觸ID卡的數據結構,通過比較奇校驗算法與讀出數據中的奇校驗位來驗證出數據的正確性。
上傳時間: 2016-10-14
上傳用戶:xhz1993
嘗試做了一個利用WINSOCK控件的自動分包發送機制的東東(VB6.0) 我最終的測試結果如下: 使用約44M的RAR文件(陳輝機器里找的一個什么安裝包,不管它...),在陳輝機器上運行客戶端,在我機器上運行服務器端,并啟動服務. 網絡環境是100M局域網,服務器端是INTEL雙核本本+2003SP2,客戶端是AMD雙核臺機+XPSP2,使用對聯線聯機. 傳送過程中,峰值速度約45Mb/S,穩定速度約40Mb/S 換算為MB/S就分別約為5.6MB/S與5MB/S 100M局域網理論最高是12.5MB/S,而測試WINDOWS的文件復制,可達10MB/S(80Mb/S),不知道怎么搞的... 這里面還有個問題,就是傳輸過程中CPU占用嚴重,達到了20%到40%左右,在單核機器上應該就是40%到 80%了吧...... 代碼采用多客戶端結構,測試過同時接收多個客戶端發送文件,正常接收. BY 嗷嗷叫的老馬 http://www.m5home.com 2008-07-29
上傳時間: 2016-11-12
上傳用戶:nanxia
四種聚類算法源代碼及示例代碼,本程序的最終目的是形成一套標準的用于聚類、可擴展的工具。包括的內容有1. 聚類算法:Kmeans和Kmedoid算法、FCMclust, GKclust, GGclust算法 2. 評估分類原型:程序可以在二維圖像上繪制出聚類的結果 3. 驗證:程序給每一個算法提供驗證機制,每個聚類算法會統計Partition Coefficient (PC), Classification Entropy (CE), Partition Index (SC), Separation Index (S), Xie and Beni s Index (XB), Dunn s Index (DI) and Alternative Dunn Index (DII)幾種衡量指標。
標簽: FCMclust GKclust GGclust Kmedoid
上傳時間: 2013-12-17
上傳用戶:13160677563