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
用AT89C51写的程序,程序很简单,能在液晶上显示简单的字体
上传时间: 2016-01-21
上传用户:woshini123456
在AVR单片机中驱动开发板上的PS2接口,实现读取PS2键盘的扫描码,并翻译成ASCII码,在 1602液晶上显示
上传时间: 2016-02-08
上传用户:netwolf
The XML Toolbox converts MATLAB data types (such as double, char, struct, complex, sparse, logical) of any level of nesting to XML format and vice versa. For example, >> project.name = MyProject >> project.id = 1234 >> project.param.a = 3.1415 >> project.param.b = 42 becomes with str=xml_format(project, off ) "<project> <name>MyProject</name> <id>1234</id> <param> <a>3.1415</a> <b>42</b> </param> </project>" On the other hand, if an XML string XStr is given, this can be converted easily to a MATLAB data type or structure V with the command V=xml_parse(XStr).
标签: converts Toolbox complex logical
上传时间: 2016-02-12
上传用户:a673761058
基于avr-gcc (GCC) 4.1.2 (WinAVR 20070525)环境开发的atmega128应用程序(带makefile文件),320240液晶图文显示,时实时钟DS12C887,ASCII格式串口通讯协议(应用无线数传),内部EEPROM读写等
标签: 20070525 makefile avr-gcc WinAVR
上传时间: 2014-01-02
上传用户:refent
单片机实现AD7705采集,用液晶3310显示,精度较高,
上传时间: 2014-01-14
上传用户:1427796291
一个用C语言控制的读写7022,存储数据,485上传数据,向液晶模块显示数据的程序。此程序为测试程序,所有与模块通讯功能都能实现。
上传时间: 2014-01-15
上传用户:xinzhch
zd1211无线网卡驱动源代码,网卡为USB接口 你可以把摄像头的驱动在编译内核的时候直接编译进去,然后把内核烧进去,以后我们每次执行应用程序就可以了, 也可以把要执行的应用程序直接写在init.sh里边看一下,那就以后连好摄像头然后一开机,摄像头就会把采集到的图象显示在屏上。
上传时间: 2016-04-11
上传用户:tianjinfan
TMS320F2812,控制点阵式液晶图形显示控制器T6963C的程序
上传时间: 2016-04-18
上传用户:hj_18
基于Ti的DSP,VC5509的LCM12864液晶驱动显示的C代码,在5509开发板上调试通过。
标签: DSP
上传时间: 2014-01-02
上传用户:gtf1207