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
这是上海交通大学著名数字电视专家,第一批长江学者特聘教授张文军的关于数字电视的PPT。该PPT很专业,学术水平很高,制作很精美。涵盖了包括模拟电视,数字电视,各种音视频编解码方案,数字电视在我国的发展概括等内容,是从事音视频信号处理人月不可多得的好资料。
上传时间: 2016-03-09
上传用户:moerwang
离散余玄的数学实现,做音视频编解码的朋友深造必备哦.
标签: 离散
上传时间: 2016-03-26
上传用户:xz85592677
利用一组样本之间的相关性,对这些样本(矢量)一起进行量化,每个样样本矢量用信号中经常出现的代表性的矢量(模式)代替。对量化参数进行二进制编码,实现压缩,以达到减少视频序列的码率的目的,以便能够在给定的通信信道上实时传输视频。
标签: 样本
上传时间: 2014-01-06
上传用户:siguazgb
用游标的方法实现对称差的计算,即 (A-B)+(B-A)
上传时间: 2016-05-23
上传用户:远远ssad
符合xdm标准的算法历程,使用视频编解码接口,调用了vfpe驱动
上传时间: 2016-06-04
上传用户:ve3344
词法分析器 对输入一个函数,并对其分析main() { int a,b a = 10 b = a + 20 }
上传时间: 2013-12-20
上传用户:hfmm633
基因算法,用VC++或MATLAB,java等工具设计一程序计算任一个随机产生的DNA基因表达式的有效长度和值 设随机产生的基因表达式为: + Q - / b * b a Q b a a b a a b b a a a b
上传时间: 2014-01-09
上传用户:aa54
函数再现机构设计 试设计一曲柄摇杆机构,再现函数 要求: 输入构件的转角范围180°,输出构件摆角范围30°,即: 当输入构件从a转至a+90时,输出构件从b转至b+30 当输入构件从a+90转至a+180时,输出构件从b+30转至b
上传时间: 2013-12-17
上传用户:英雄
PS2键盘的单片机读取程序代码,单片机相应引脚与PS2连接,运行后,显示屏上显示按键,可以接条形码扫码器,调试通过
上传时间: 2014-01-07
上传用户:1079836864