Codeforces #349 Div1. A. Reberland Linguistics

レート増のチャンスをまたしょうもないミスで逃した。 http://codeforces.com/contest/666/problem/A