Addition on Segments

2020 VietMX 0

Grisha come to a contest and faced the following problem. You are given an array of size $n$, initially consisting of zeros. The elements of […]

Median on Segments

2020 VietMX 0

You are given a permutation $p_1, p_2, \dots, p_n$. A permutation of length $n$ is a sequence such that each integer between $1$ and $n$ […]