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

Автор ShowStopper728, история, 9 лет назад, По-английски

I was trying to solve this graph problem .

my idea is the same as the editorial but I get TLE in test 34 can anyone help me ?

here is my code

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

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

Your code is very "dirty". You re-declare arrays, Graph struct in every recursion and it eats many time to make new copy of that. Use global variables.

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

You can refer this : My solution