朋友,我是Jawen.看到先前上載的一套CPLD開發板的VHDL源碼挺受歡迎的,現在就將她的Verilog源碼也一并貢獻給大家:8位優先編碼器,乘法器,多路選擇器,二進制轉BCD碼,加法器,減法器,簡單狀態機,四位比較器,7段數碼管,i2c總線,lcd液晶顯示,撥碼開關,串口,蜂鳴器,矩陣鍵盤,跑馬燈,交通燈,數字時鐘
標簽:
上傳時間:
2014-01-23
上傳用戶:wys0120
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