Рет қаралды 257
Codeforces Round 955: codeforces.com...
Solved 5/6 problems, found the problems to be on the easier side
Brief explanations for problems D and E:
D: codeforces.com...
Key realization: with every update, add or subtract the difference of 1 and 0 in the submatrix to the difference in the sum of values
Use cumulative sum in a 2D array to compute 1 and 0
E: codeforces.com...
Divide and conquer approach, storing (number of sub-arrays, max index, min index) at each node. Merge answers from two nodes for a given n