题目链接:http://codeforces.com/problemset/problem/1151/F
CodeForces 1151F Sonya and Informatics
原文:https://www.cnblogs.com/zaq19970105/p/10787901.html