Codeforces Cycles

http://codeforces.com/problemset/problem/232/A

http://codeforces.com/blog/entry/5514

Can anyone explain the editorial here for this problem??
I didn’t get anything out of it…