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
μC/OS从1992年开始为人们熟悉,到现在已经发展为μC/OS-II。ΜC/OS-II最多支持56个任务,其内核为占先式,总是执行就绪态的优先级最高的任务,并支持Semaphore(信号量)、Mailbox(邮箱)、Message Queue(消息队列)等多种常用的进程间通信机制。与大多商用RTOS不同的是,μC/OS-II公开所有的源代码,并可以免费获得,对商业应用收取少量License费用。
上传时间: 2016-03-11
上传用户:希酱大魔王
The main purpose of this project is to add a new scheduling algorithm to GeekOS and to implement a simple synchronization primitive (semaphore). As you might have already noticed, GeekOS uses a simple priority based preemptive Round Robin algorithm. In this project, you will change this to a multilevel feedback scheduling. In addition, you will provide user programs with semaphores, a means to check the system s current time and a mechanism for passing command-line arguments
标签: scheduling algorithm implement to
上传时间: 2013-11-27
上传用户:Late_Li
Space-Time Processing for CDMA Mobile Communications.Written for research students and design engineers, this book addresses many basic questions related to the use of space-time processing in CDMA-based third-generation systems
标签: Communications Space-Time Processing for
上传时间: 2014-01-13
上传用户:cooran
51单片机下移植uCOS-II源码,包含四个章节介绍的移植源码及驱动程序,配套“uC/OS-II内核分析、移植与驱动程序开发”
上传时间: 2014-12-22
上传用户:haohaoxuexi
这是一本介绍嵌入式操作系统uc\os-ii的经典书籍,本文中不但介绍了uc\os-ii操作系统的基础,而且介绍了移植的具体事项。
上传时间: 2016-10-03
上传用户:bakdesec
对嵌入式实时操作系统斗C/OS一Ⅱ的组成和S3c2410微处理器进行了简单介 绍。在此基础上,详细介绍了将斗C/OS—II移植到S3C24lo微处理器的步骤和方法,指出 了移植过程的关键点和相应的处理办法,并对移植过程的关键部分进行了详细描述。
上传时间: 2016-11-11
上传用户:qq1604324866
《嵌入式实时操作系统μC/OS-Ⅱ》的源码,包含uc/os-ii的所有源码
上传时间: 2014-11-27
上传用户:龙飞艇
The SL74HC573 is identical in pinout to the LS/ALS573. The device inputs are compatible with standard CMOS outputs with pullup resistors, they are compatible with LS/ALSTTL outputs. These latches appear transparent to data (i.e., the outputs change asynchronously) when Latch Enable is high. When Latch Enable goes low, data meeting the setup and hold time becomes latched.
标签: compatible The 573 identical
上传时间: 2016-12-29
上传用户:变形金刚
The Window Design Method The basic idea behind the design of linear-phase FIR filters using the window method is to choose a proper ideal frequency-selective filter [which always has a noncausal, infinite duration impulse response] and then truncate its impulse response hd[n] to obtain a linear-phase and causal FIR filter h[n]. To truncate the impulse response of the ideal filter a time window w[n] is used. Available windows in Matlab are rectangular [or boxcar in Matlab], bartlett, hamming, hanning
标签: linear-phase The the filters
上传时间: 2017-03-20
上传用户:PresidentHuang