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
能够非线性函数的曲线拟合,包括一个Matlab的m文件和存有实验数据的txt文件。
上传时间: 2014-01-16
上传用户:851197153
根据圆锥误差补偿算法和划船误差补偿算法的研究成果,考虑到实际捷联惯导算法 仿真程序编写的方便性,总结了一些与捷联惯导更新算法有关的函数的计算公式。对圆锥误 差补偿算法和捷联惯导算法进行了仿真,仿真结果和理论分析结论吻合。在附录中给出了 Matlab 的m 文件源程序代码,具有一定的参考价值。
上传时间: 2016-06-11
上传用户:脚趾头
MIT麻省理工的电磁场理论讲义,很经典,里面包括用于计算的matlab的m文件和动画,非常不错的学习资料。
上传时间: 2014-12-03
上传用户:sk5201314
卡尔曼滤波,在matlab上实现,此为记事本文件,复制到matlab的M文件即可运行
标签: 卡尔曼滤波
上传时间: 2016-12-12
上传用户:米卡
维纳滤波器,在matlab中运行,此为记事本文件,复制到matlab中M文件即可运行
标签: 维纳滤波器
上传时间: 2014-01-07
上传用户:英雄
OFDM仿真程序,在matlab环境下运行,此为记事本文件,复制到matlab的M文件即可运行。
上传时间: 2013-12-26
上传用户:talenthn
板球系统的模糊控制,用matlab的M语言写的模糊控制器,用siumlink做的仿真。
标签: 模糊控制
上传时间: 2013-12-30
上传用户:chfanjiang
汉诺塔!!! 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
我自己写的赛程安排的数学建模的文章,其中的算法,我是用MATLAB的M文件编写的,简单方便易懂
标签: 数学建模
上传时间: 2013-12-17
上传用户:fredguo