Grand Prix of SPb
Let's discuss problems.
How to solve E ? Someone solved B without precomputing the answers ?