burakcetin's blog

By burakcetin, history, 9 years ago, In English

14438156

My code gives the answer right on my linux(ubuntu) computer but it fails at system testing. I believe it's something about vectors I use in the code (ans,tem) but I could not find the exact reason. Any ideas? (Also it could be nice if someone tests the code. Maybe it will fail on other computers as well. Who knows?)

EDT: Problem solved

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

»
9 years ago, # |
  Vote: I like it +11 Vote: I do not like it
int lca[30][500005];
...
if(lca[30][a]!=lca[30][b])
    ...

Accepted code : http://mirror.codeforces.com/contest/587/submission/14438541

»
9 years ago, # |
  Vote: I like it -8 Vote: I do not like it

Auto comment: topic has been updated by burakcetin (previous revision, new revision, compare).