ShowStopper728's blog

By ShowStopper728, history, 9 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

»
9 years ago, hide # |
 
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.

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

You can refer this : My solution