|
|
back to boardAC at least, but for me this problem very strange! Heavy-Light-Decomposition -> GOOD data structure! thank you all! Re: AC at least, but for me this problem very strange! Posted by Solver 4 Jun 2026 11:35 sqrt(n) decomposition also works here (0.5 sec) and easier to implement it's actually does not differ much because heavy-light with segment/fenvick over chains will be something like Q*log^2(N) with bad constant over it Re: AC at least, but for me this problem very strange! Posted by Solver 4 Jun 2026 12:33 Actually it was the other way around :) except for ram usage SQRT: 0.437 11 532 KB HLD: 0.296 14 784 KB |
|
|