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
led接口编程,适用于硬件接口开发的人参考
上传时间: 2013-12-11
上传用户:z754970244
软件工程案例分析,机票预定信息系统的总目标是:在计算机网络,数据库和先进的开发平台上,利用现有的软件,配置一定的硬件,开发一个具有开放体系结构的、易扩充的、易维护的、具有良好人机交互界面的机票预定系统,实现航空公司的机票销售的自动化的计算机系统。
上传时间: 2013-12-25
上传用户:dyctj
:随着嵌人式系统的迅速发展,32位微处理器和实时操作用越来越广泛。本文提出了一种基于STR710FZ2TB的嵌人式系统设计, 重点分为三个部分,系统硬件设计、系统的应软件设计、应用实例。本文首先介绍了STR710FZ2TB微控制器和uC/OS-II操作系统的特点, 然后详细描述了软硬件设计过程,在此基础上设计了一个时钟实例,最后介绍了硬件的开发环境和ARM软件开发环境,完成了整个设计过程。 关键词:嵌入式系统;ARM7TDMI;实时操作系统;动态显示
上传时间: 2016-06-09
上传用户:龙飞艇
TMS320vc5402综合实验板原理图,包括STC89LE58RD+芯片,以及CPLD ,对嵌入式硬件系统开发,有很大参考价值
上传时间: 2014-12-06
上传用户:lwwhust
ISP的下载使用,对硬件的开发很有用的东西,
标签: ISP
上传时间: 2014-01-09
上传用户:1159797854
该书是USB系统架构得详细解析,如果您还烦恼于寻找USB开发资料那么这本书会对您有所帮助。它对USB硬件文档进行了详细解析,可作为USB系统软件硬件得开发手册。
上传时间: 2017-01-29
上传用户:nanfeicui
汉诺塔!!! 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
详细介绍了CRC的相关原理和标准,特别适合硬件语言开发所用
上传时间: 2017-02-15
上传用户:bcjtao
基于51单片机的频率计设计,附源程序和原理图,采用汇编语言编写,硬件使用开发板设计
上传时间: 2014-12-05
上传用户:731140412