ShowStopper728's blog

By ShowStopper728, history, 7 years ago, In English

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

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

»
7 years ago, # |
  Vote: I like it +3 Vote: I do not like it

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.