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 ?
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 ?