bluefog's blog

By bluefog, history, 8 years ago, In English

Submission under review : http://codeforces.net/contest/767/submission/24809891

For problem : http://codeforces.net/contest/767/problem/C

Which cases am I missing? I tried to implement the two conditions as given in the tutorial but the submission fails for test 9 (which is a large one, i cannot debug by viewing the case).

Thank you for your time and attention

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

| Write comment?
»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

in the editorial it was written:

To check the second option, let's write down all vertices v such that sv = x / 3 and there is no other u with su = x / 3 in the subtree of v

I think, you are not checking this correctly.