Hey,
I was just up solving Codeforces Round #837 (Div. 2). And, despite optimizing the solution to problem C to the greatest extent possible in terms of time complexity, my java code still gives TLE on test case 3, whereas the same implementation with the same logic works perfectly in C++.
My solution: here C++ solution: here
Even Magenta Cobra is unable to solve the problem in java: his solution
The worst part is that these scenarios are not uncommon; in fact, I experience them on a regular basis. I would greatly appreciate it if you could advise me on a workaround for this.
Be epic, Ayush