题目:http://codeforces.com/contest/839/problem/...