|
|
back to boardTime Limit... Posted by Ruslan 5 Nov 2006 14:47 I use: 1)sort 2)count algorithm in the loop to get the number>N/2; that loop iterates each elem. of a container... How to avoid Time Limit..? Re: Time Limit... I have three ideas: 1) Use fast sorting algorithm 2) Don't use containers. I don't like it because it is too hard to debug solutions while using it, and i think containers works slower. 3) Don't use sorting at all. Try to find O(N) algortihm. |
|
|