readme
来自「American Gladiator,You are consulting fo」· 代码 · 共 4 行
TXT
4 行
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.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?