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
Bootload 程序,用于引导恒丰瑞科 S3C2410 开发板启动。支持: 1. 中断; 2. tftp下载; 3. xmodem下载; 4. 可扩展启动命令;
上传时间: 2016-01-17
上传用户:lijinchuan
6221mada.asm.........遥控电机程序, 按遥控器0-9步进电机正转0-9步,按遥控器11-19步进电器分别反转 dianji.asm..........步进电机正转,反转各3圈 keyd.asm............步进电机控制程序p3.2正转,p3.3反转,p3.4停止 步进电机接p1.0p1.1p1.2p1.3
上传时间: 2016-01-17
上传用户:海陆空653
delphi中的几个技巧 1、判断一个字符串是否包含于另外一个字符串的方法 例如:if pos( ab , abcd )<>0 then messagedlg( ab是包含于abcd ,mtConfirmation,[mbYes, mbNo],0) pos(obj,target) 在target字符串中找出第一个出现obj的第一个字符位置,如果找不到,返回0. 2、如何使窗口全屏,类似游戏一样,而不是窗口的最大化! (1) BorderStyle 为 bsNone (2) Windowstate 为 wsMaximized (3) 退出时可加一个按钮之类的,写上 close 即可退出。
标签: abcd messagedlg delphi then
上传时间: 2013-12-31
上传用户:z754970244
自动卖报机,5分一份,有1,2,5分类型的硬币。verilog状态机
标签: 自动
上传时间: 2013-12-20
上传用户:BIBI
稀疏矩阵运算器 本程序要求用“带行逻辑链接信息”的三元组顺序表表示稀疏矩阵,实现两个矩阵相加、相减和相乘的运算。具体有以下几点: 1.本程序中稀疏矩阵的输入形式采用三元组表示,而运算结果的矩阵则以通常的阵列形式列出。本实验的三元组输入顺序为在行号小的优先的条件下,列号小的输入!要求输入的行数与列数不大于20,且输入三元组的结束标志为“0 0 0”。 2.程序执行过程: (1)运行后,打印出功能选项,可供选择。 (2)选择相应功能后,若选1~3,则要求输入两个矩阵的行数与列数,再以三元组顺序输入矩阵,并且打印出响应的运算结果。接着循环执行(1),(2)。 (3)若选择4,quit。则直接退出程序。
上传时间: 2013-12-22
上传用户:fandeshun
This packet is a IS-95 baseband simulation for 1 data channel of 9.6 KBps rate. The simulation is written for static channel and AWGN noise. The packet include: 1) Packet Builder (Viterbi Encoding, Interleaver, PN generation) 2) Modulator (RRC filter) 3) Demodulator (Matched Filter, RAKE receiver) 4) Receiver (HD or SD) (Deinterleaver, Viterbi Decoder).
标签: simulation baseband channel packet
上传时间: 2014-12-20
上传用户:ukuk
ShowImage: TFTShowImage: TFT_CS JMP_REQI Image_Index_TFT,1,ShowImage1 JMP_REQI Image_Index_TFT,2,ShowImage2 JMP_REQI Image_Index_TFT,3,ShowImage3
标签: ShowImage JMP_REQI Image_Index_TFT TFTShowImage
上传时间: 2016-04-01
上传用户:离殇
在win2000sp4 + VM6基本稳定。 原理不多说了,自己看代码吧,我也早就发过了驱动的代码了,现在的就是一个完整的应用。希望能够对大家有一点帮助,但是不要用在不该用的场所。 使用方法将: dd1压缩包里面是驱动源码 console压缩包里面是控制台源码 hide.exe是最终产品 使用方法: 1、将hide.exe复制到系统目录 2、运行cmd 3、hide -h 查看帮助 hide -i 安装驱动 hide -u 卸载驱动 hide -f -a filename 添加一个隐藏文件
上传时间: 2013-12-12
上传用户:liglechongchong
史上最强的s3c2410中文手册,含第1,2,5,6,8,15,16章,是研究ARM9的非常难得的好资料!
标签: s3c2410
上传时间: 2016-04-07
上传用户:阿四AIR