Title |
User |
Message |
Date Posted |
Re: Are you positive that it is doable with Python 3? |
FatalEagle |
It appears that the memory limit is too low to even read all the input into a list. AFAIK, this is impossible to solve with python without buffering the input. |
Nov 25, 2014 - 3:23:08 pm UTC |
Are you positive that it is doable with Python 3? |
Ajna |
Just asking, as I'm at a loss about how to implement it and still stay in the time limit. I may try looking for some FIFO data structure and improve it a bit more, but I am not sure that I can halve t... |
Nov 25, 2014 - 12:12:13 pm UTC |
Re: Time Limit |
EasierPlanet3 |
I made the optimizations you suggested, and it indeed runs in under 0.2 seconds now in every case. Thanks again. |
Nov 21, 2014 - 2:45:46 pm UTC |
Re: Time Limit |
EasierPlanet3 |
Thanks for your reply, Eagle; I always use Scanner, but a quick Google search suggested that some combination of BufferedReader, InputStreamReader and Integer.parseInt is better. Is this what you wou... |
Nov 21, 2014 - 2:22:04 pm UTC |
Re: Time Limit |
FatalEagle |
Your Java solution had quite a lot of constant overhead (mod is expensive), not to mention you were using Scanner. |
Nov 21, 2014 - 2:06:45 pm UTC |
Time Limit |
EasierPlanet3 |
I have to agree with xiaowuc1; even with the 0.5 second limit, my linear-time, cache-friendly algorithm timed out on the last two cases when implemented in Java. I had to dust off my ancient C manual... |
Nov 21, 2014 - 12:48:45 pm UTC |
Re: Overly strict time limit? |
xiaowuc1 |
The time limit was 0.1 seconds, and my solutions originally had TLE prior to the rejudging. Asymptotically though, I'm confident that they have the same time complexity as the intended solution. Test... |
Jun 01, 2014 - 5:49:45 am UTC |
Re: Overly strict time limit? |
fifiman |
the time limit is 0.5 seconds. and you solved the problem so why does it matter? |
Jun 01, 2014 - 1:27:19 am UTC |
Overly strict time limit? |
xiaowuc1 |
I think the 0.10 second time limit on this problem is unreasonable. 0.10 seconds isn't enough time to even read in the entire input file in some languages. The actual time limit in the practice enviro... |
May 31, 2014 - 11:36:19 pm UTC |