|
|
back to boardCommon BoardProb 1090 "In the army now" : I know its algorithm is "Balanced tree" but is there any other algorithm run in time limit ? 71222119 mailto : trungduck@yahoo.com Re: Prob 1090 Yes there is much simpler algorithm for this problem, just use array [1..10000] and do binary search on it. Use the elements of the array to denote how many times you have gone left of them(during the binary search). You should do this sequentialy for every element in the input, and you'll get n * log 10000 algorithm. |
|
|