I am trying to read a single line which is about 2 million characters long from the standard input using the following code:
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
s = in.readLine();
For the aforementioned input, the s = in.readLine();
line takes over 30 minutes to execute.
Is there a faster way of reading this input?