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

Автор ahmadexe, история, 2 года назад, По-английски

So I am a newbie in DFS and BFS, and was solving this problem. Surprisingly, giving TLE in 3rd testcase. I can't seem to understand where code is inefficient since time complexity is looking fine to me.

I have added some comments, which don't use the ideal terminologies but would hopefully convey what I'm trying to do

https://codeforces.me/contest/1948/submission/267884593

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