ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1413. Mars Jumper

If you have TLE 6 on Java
Posted by Oleg Strekalovsky [Vologda SPU] 28 Mar 2009 16:54
Use this
Scanner in = new Scanner(new BufferedInputStream(System.in));
It's enought =)
Re: If you have TLE 6 on Java
Posted by Alex Tolstov (Vologda STU) 29 Mar 2009 19:39
And what is faster? Your method or using StreamTokenizer?
Re: If you have TLE 6 on Java
Posted by Konstantin Yovkov 2 Nov 2009 20:22
Don't use Scanner - it's very slow.
Instead of it you can use:
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); , which throws IOException, but you can handle it.