decreasing runtime

java

#1

hii guys,

just wanted to know is there any other way other than BufferedReader or Scanner to make java program faster if yes will it make any difference in codechef submission and what time difference are we looking at here…!

say it takes 2 input per iteration and iteratation goes upto very large number around 1000000.


#2

For one problem LECANDY, I tried to submit using BufferedReader, it gave me “TLE”.

When I used Scanner, it gave correct answer, although the time taken in case of Scanner was of 0.46 sec, which was more than TIME limit specified in question, is there some issue with compiler or am I missing something ?