Блог пользователя turral

Автор turral, история, 3 месяца назад, По-английски

Hi. I was implementing my own HLD and I used this problem: CSES2134-Path Queries II in order to practice. But, the thing is, whatever I do it won't stop giving TLE on test case #9. To see if the time difference was huge compared to other solutions, I used the USACO Guide solution, but it also received a TLE verdict. Other codes from GitHub I've tried have the same result. Is this common for CSES to have such tight time limits or is there something wrong with this particular problem?

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
3 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by turral (previous revision, new revision, compare).

»
3 месяца назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

CSES problem have a problem with time limit with all almost all problem so u need to optimize it so much you can try this template https://github.com/ShahjalalShohag/code-library/blob/main/Data%20Structures/HLD.cpp