Racer5x's blog

By Racer5x, history, 5 years ago, In English

First of all thanks for reading this blog..... I am trying to do dfs on a tree of size 2*(10^5) but there is some kind of error(I am sorry that i can't point out of which kind). It works for small inputs but it's not working for the above mentioned size....

DFS Code

and the test_case at which it is failing is cses tc 5. Any help will be appreciated.....

BTW the solution which i submitted for this(Problem Link) problem is

Spoiler

Thanks... (Sorry for my bad English)

SOLVED!!!!

  • Vote: I like it
  • +10
  • Vote: I do not like it

»
5 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Sorry for bothering anyone who was genuinely trying to help, i solved the problem by making the array static, and i was having problem to run that case on sublime as it was not responding correctly... Thank you for your patience..

BTW, if anyone know how to run your program for large testcase like in this one plz. tell me(As custom invocation only supports tc of size 256 kb) Thank you...