Internet Direct(Indy)是一組開放源代碼的Internet組件,涵蓋了幾乎所有流行的Internet協議。Indy用delphi編寫,被包含在delphi 6,Kylix 1和C++ Builder 6及以上各個版本的Borland開發環境中。Indy曾經叫做WinShoes(雙關于WinSock——Windows的Socket庫),是由Chad Z. Hower領導的一群開發者構建的,可以從Indy的站點www.nevrona.com/indy上找到更多的信息并下載其新版本。到筆者撰寫本文時為止,Indy的最新穩定版是9.0.14,Indy 10也進入了Beta測試階段。
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.
漢諾塔!!!
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