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 1100. Final Standings

Fastest Java solution - 0.203s
Posted by void 28 Jul 2010 05:16
First you should use BufferedReader for input and PrintWriter for output.
Then you should create a big char[] buffer, read() whole input (3000000 chars is enough), manually parse it for data and put it into an array of some kind of Collections.
While parsing you should calculate the length of output.
Then you should create a char buffer of calculated size, manually fill it and print() whole buffer at once.

If you still can't get the idea, write to Abrackadabraa@gmail.com.

Java isn't slow, you just can't cook it. =)

Edited by author 28.07.2010 05:20