Hello, I was solving this problem : http://codeforces.net/problemset/problem/486/B
Here is my submission : http://codeforces.net/contest/486/submission/15134351
The same code on ideone gives correct answer in both C++14 and C++ 5.1 : http://ideone.com/NUMK5T
There maybe something I'm doing wrong. Would he great if anyone could help.
Thanks Alot!