Need help !
I don't know why my solution is giving TLE as the same solution is accepted in codechef : codechef.com/viewsolution/374629816
Solution at Ideone : ideone.com/e.js/Rof2pJ8
created
last reply
- 3
replies
- 619
views
- 2
users
- 2
links
Need help !
I don't know why my solution is giving TLE as the same solution is accepted in codechef : codechef.com/viewsolution/374629816
Solution at Ideone : ideone.com/e.js/Rof2pJ8
Hi Leppy,
I am using StringTokenizer to split the inputs by space and store in variables.
This program is taking 1s and is accepted in codechef.
Here the Time limit is 3s and still it is giving TLE.
multiple(100's+) System.out.println() will make the program slow, thats why StringBuilder to concat the result and giving output at one go.
Topic | Category | Replies | Views | Activity |
---|---|---|---|---|
Strategies for Tackling Java-Based SPOJ Problems More Efficiently? | JAVA based languages | 0 | 65 | May 23 |