Java seems to be hindering my efforts.

Revision en1, by creativegiant, 2022-12-26 10:04:09

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

Tags java

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English creativegiant 2022-12-26 10:04:09 967 Initial revision (published)