TLE errors in Python

Правка en1, от AdeelFeroz, 2022-07-14 16:45:20

Hi, while solving 1702C — Train and Queries I was constantly getting TLEs in Python. While when I tried to submit the solution in JAVA with the same approach it got accepted. Java Solution -> https://codeforces.me/problemset/submission/1702/164153330 Python Solution -> https://codeforces.me/problemset/submission/1702/164151905 (Also submitted in PyPy, it didn't work either)

I want to know what causes the issue? and how to prevent it...

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский AdeelFeroz 2022-07-14 16:45:20 526 Initial revision (published)