Having trouble with problem related to Mo's algo on tree (SPOJ COT2)

Revision en2, by Polyn0mial, 2022-02-17 15:59:20

I was solving this Problem Link and encountered a bug. I'm getting WA on test 10, but I run stress test locally on my PC and didn't found any counter test cases. Please take a look on my code.

Approach that I used to solve this problem

Here are my code.

Test Case Generator
Brute force solution
My submission

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Polyn0mial 2022-02-17 16:19:11 56 Tiny change: 'oiler>\n\n' -> 'oiler>\n\nEDIT: SOLVED. Stupid mistake in binary lifting function.'
en2 English Polyn0mial 2022-02-17 15:59:20 90
en1 English Polyn0mial 2022-02-17 15:52:42 5749 Initial revision (published)