Suneo 0C0 - A - UVa 10100: Wrong Answer, `longest match`の解釈を間違えてるっぽい