Блог пользователя bluefog

Автор bluefog, история, 8 лет назад, По-английски

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

For problem : http://codeforces.me/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

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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.