[OpenCup] Grand Prix of Grushevka
Can anybody post their solution to problem G?
Codeforces Round 1094 Solution Discussion