目前看别的帖子发现第二题是cf的https://codeforces.com/contest/1411/problem/C