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
L297,L298驱动步进电机程序,能通过按键控制电机正反转
上传时间: 2013-12-26
上传用户:libenshu01
昨晚自己画的图和用C51写的程序。程序比较简单,对工程师级别的可能没有什么用,但对学徒还是有点帮助的。 电路和程序实现了如下功能: 1.两个步进电机的运行和停止可以单独控制。 2.两个步进电机的正反转可以单独控制。 3.可以调节转速(不能单独调速) 4.具有上限位和下限位。
上传时间: 2016-02-24
上传用户:拔丝土豆
步进电机,可以控制转速,正反转,数码管显示转速,
标签: 步进电机
上传时间: 2013-12-17
上传用户:rocketrevenge
电动绕线机计数器(电路及源代码).很简单的入门的东东。 简要说明 2004年12月做的小项目,40来台机,已在车间运行n年了。 <电动绕线机计数控制器> 包括汇编源代码、烧录代码 开发环境:Keil 光电开关作计数 每转10个脉冲,用中断计数。 可设定停机数。 可以正反转计数 工作稳定 可快速预置4组数值 可循环在两组设定数之关来回计数
上传时间: 2016-03-18
上传用户:nanshan
单片机控制步进电机,正反转,加速减速。 文件包含电路图。
上传时间: 2013-12-02
上传用户:时代电子小智
用游标的方法实现对称差的计算,即 (A-B)+(B-A)
上传时间: 2016-05-23
上传用户:远远ssad
一个简单的直流电机的单片机程序,用来控制电机的正反转
上传时间: 2014-10-29
上传用户:标点符号
步进电机的调速程序,用汇编编写,具有正反转条速功能
上传时间: 2016-06-09
上传用户:xfbs821
控释电机调速,pwm生成,控释正反转,且可以加速减速
标签: 电机调速
上传时间: 2013-12-17
上传用户:Thuan