I'm not the OP, but still...

> But before you start frantically coding a better sort method, let me ask you: 
> why didn't you simply use Arrays.sort from the standard library? It's 
> available, it's correct and it's very fast.
When sorting arrays of primitive types, Arrays.sort uses Quicksort, which is 
O(n²) in the worst case. There are generators of tests which make Arrays.sort 
work in O(n²) time, e.g. this: 
http://codeforces.com/contest/101/submission/3882807

> Likewise, why did you code your own "FastReader" and not just use Scanner? It 
> even has the same method names :)
Because Scanner is SLOW. Try to read a million numbers using Scanner and using 
FastReader. In general, if you think that standard library functions do their 
job in the best possible way, you're wrong.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/e205bf57-4bce-46e1-83e6-0461c5fb814e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to