I was trying to solve problem Fygon 2.0 from [ICPC 2017–2018, NEERC, Northern Subregional Contest](https://codeforces.me/gym/101612/attachments/download/6287/20172018-acmicpc-neerc-northern-subregional-contest-en.pdf), but I couldn't come up with a solution, so I decided to check out [this editutorial](https://nerc.itmo.ru/archive/2017/northern/north-2017-analysis.pdf). Unfortunately, the editorial is in Russian and the explanation is quite short and is probably omitting a lot of details. Using google translate I managed to understand that we should build a DAG where nodes represent the variables in the nested for loops and the edges represent inequalities between variables, but I don't understand how you can compute $C$ and $k$ from that. Any help is appreciated. Thanks in advance.