How to solve "Pivoting point" from 19-20 Pacific Northwest regional?

Revision en1, by twangal, 2020-03-10 11:28:28

Original comment: https://codeforces.net/blog/entry/72252?#comment-587046

How to solve "2019-2020 ACM-ICPC Pacific Northwest Regional Contest" problem H pivoting point?

Particularly, there's a "p-dk.cc" in the official solution package [1]. Its logic looks much simpler than the editorial, but I don't understand why it works. Meanwhile, a bunch of submissions seem to follow the same logic. Could somebody explain it to me? In particular, what does [left] and [rep] mean?

[1] http://www.acmicpc-pacnw.org/ProblemSet/2019/editorial.zip

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English twangal 2020-03-10 11:28:28 615 Initial revision (published)