Help Needed: TLE Verdict in Contest 1872F Problem

Правка en1, от karansrivastava, 2023-09-09 21:34:09

I recently participated in Codeforces Round 895 (Div. 3) and encountered a Time Limit Exceeded (TLE) verdict for problem 1872F - Selling a Menagerie. Despite optimizing my code, I'm still puzzled by the TLE result.

I believe my code, with a time complexity of around O(10*n) which is near about o(n).

My code received a TLE verdict, which I find unexpected given its theoretical efficiency.

Could anyone please examine my code and share insights or optimizations.

Code Link: 222367949

Your assistance would be greatly appreciated.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский karansrivastava 2023-09-09 21:34:09 586 Initial revision (published)