I want to complaint about the unfair time limit.
My Java code just read in the input data without doing anything, then it gives me TLE.

This problem is highly I/O bound.
If the C/C++ code needs 0.8 second, then the Java code needs at least 5 seconds.