Why this happens? Exact same solution submitted in java and C++. RESULT: JAVA
C++
C++ is much faster than JAVA
But the time limit for each language should be different