We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
This code, which is part of the template and only scans the input, also times out on the 6th case on java 8
private static final Scanner scanner = new Scanner(System.in);
public static void main(String[] args){
int n = scanner.nextInt();
scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");
String[] unsorted = new String[n];
for (int i = 0; i < n; i++) {
String unsortedItem = scanner.nextLine();
unsorted[i] = unsortedItem;
}
scanner.close();
}
Big Sorting
You are viewing a single comment's thread. Return to all comments →
I actually think this is a bug
This code, which is part of the template and only scans the input, also times out on the 6th case on java 8