Can someone explain 1917B solution?

Правка en1, от EErbium, 2023-12-30 17:16:38

This was my solution with O(n^2) complexity:

https://mirror.codeforces.com/contest/1917/submission/238752759

Here is the solution with a lower complexity:

https://mirror.codeforces.com/contest/1917/submission/239038045

I did not understand what was done in the solution. Can anyone explain?

Теги c++, explanation, need explanation, need help, solution, editorial

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский EErbium 2023-12-30 17:19:39 79 (published)
en1 Английский EErbium 2023-12-30 17:16:38 325 Initial revision (saved to drafts)