C. 思维 Pipes Codeforces Round #590 (Div. 3)

NoSuchKey