my_lie_in_april's blog

By my_lie_in_april, history, 5 years ago, In English

Link to the problem: https://codeforces.me/problemset/problem/1622/D

In this problem's editorial, they mention that there is an O(N) solution that work with this problem, and now I'm curious to learn it. Can anyone help me ?