?? readme
字號:
1. American Gladiator Firstly,we need the user input the number of the contests n.Then give each of contestants and gladiators a number,gennerating two random permutation corresponding to each of contestants and gladiators's strength. Secondly, we use an randomized algorithm just like randomized quicksort. Suppose we use A[n] save contestants and use B[n] save glatiators. Select a number randomly from 1 to n,suppose it k. Then we us B[k]'s strength compare with every number in A[n],dividing A into two part,one part are weaker than B[k] and another part are stronger than B[k].Now,we use A[l] whose strength is equal with B[k] compare with every B except B[k].Then we divide B into to part too.Use this algorithem to to every part of A and B,until every part is only one menber,then we get the result.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -