I'm new to SPOJ, and is practically using this site's problems to practice my Python.
I tried FCTRL and got TLE every time. I don't quite understand the reason, I timed my solution myself and I get a 3-sec result which has included time for input and output, and this problem's time limit is 6s.
Another weird thing is that, I checked the best solution for this problems, there're people who get this solved in almost no time at all (in PYTH, of course). How can that happen? Just by input I lost 1s and another 0.7s for output. Any optimization?
Any idea, about this?
I search the forum and found someone suggested using sys.stdin.readline to reduce input time, but still, TLE.
And I'm quite sure my solution is correct.
created
last reply
- 11
replies
- 564
views
- 4
users