A question on Educational Codeforces Round 120 problem D

Правка en1, от my_lie_in_april, 2022-01-01 09:24:31

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 ?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский my_lie_in_april 2022-01-01 09:24:31 336 Initial revision (published)