ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1510. Order

Time 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...
Posted by Nechaev Ilya (Rybinsk SAAT) 5 Nov 2006 15:25
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.