You are viewing a single comment's thread. Return to all comments →
For Java submissions, having
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
and then using something like
String[] tmp = in.readLine().split(" "); int x = Integer.parseInt(tmp[0]); String s = tmp[1];
instead of normal Scanner nextInt(), next() methods cuts processing time in half.
For testcase #5 my submission times were:
System.out.print(s + " ");
StringBuilder
BufferedReader
Either way if the implementation really is good the test should pass independent of using Scanner and System.out.print for each of the items
Seems like cookies are disabled on this browser, please enable them to open this website
The Full Counting Sort
You are viewing a single comment's thread. Return to all comments →
For Java submissions, having
and then using something like
instead of normal Scanner nextInt(), next() methods cuts processing time in half.
For testcase #5 my submission times were:
System.out.print(s + " ");
)StringBuilder
for output)BufferedReader
method shown above)Either way if the implementation really is good the test should pass independent of using Scanner and System.out.print for each of the items