Rosetta Problems

Codeforces Educational 1F - Cut Length

https://oj.vnoi.info/problem/cf_edu1f