orz_m256i's blog

By orz_m256i, history, 2 years ago, In English

1746D — Paths on the Tree

My submission record: https://codeforces.me/contest/1746/submission/176362223

Personally, I think the time complexity of this code is enough to pass this question, but I got Time limit exceeded on pretest 4. Where did this code go wrong?

  • Vote: I like it
  • -5
  • Vote: I do not like it

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

your code fails because the time complexity is not enough to pass this question

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Count how many times you call dfs.