Why WA? have any critical input, please?
problem : http://codeforces.com/contest/714/problem/B code : http://pastebin.com/bD9sBRgT
Atcoder ABC #354 Solution Discussion