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

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

The problem is not monster itself but problem name is....Can anyone tell me why i am getting tle...i am not able to figure out the time complexity of my solution.207893184

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

»
11 месяцев назад, # |
Rev. 4   Проголосовать: нравится +1 Проголосовать: не нравится

Edit : I generate this test case in which your dfs will run in $$$O(n*m)$$$, the issue is your dfs update the value of each node too many time

1
2001 2000
2 1 0 2 1 0 ....
1 2
2 3
...
(simple path)