Code: Select all
3
1 2
1 2
2 1
Moderator: Board moderators
Code: Select all
3
1 2
1 2
2 1
Pardon me? I checked the problem statement again, but I couldn't find anything like this. The only limit I found was:prince56k wrote:if u carefully read the problem description u will find that the range of location is not more than 500000.
It is most likely that UVa dataset is larger than the one used during the contest. I got it AC during the contest using the algorithm stated above but the same code used about 3.6 seconds in the 24-hours judge.CodeMaker wrote:Can anyone who got Acc in contest tell me...Is now UVA data larger then the contest or is it the same data size?
Thanks.....
There is another thread on this problem (http://online-judge.uva.es/board/viewtopic.php?t=6962), some possible O(N) solutions are mentioned there.htl wrote:I just read the data, separating them into 2 groups, one for i<j and i>j for the other. And I sort them and compare them. I got AC for such a long time. Could you share your method?