Hi codeforces community, I'm new to codeforces and also a beginner in competitive coding.In the previous contest, i tried to solved this question . "http://mirror.codeforces.com/contest/879/problem/B ". the code run perfectly on my compiler ,but it failed to run in some test cases codeforces compiler .i tried in few other online compiler, they gave the same response as my compiler gave. My solution "http://mirror.codeforces.com/contest/879/submission/31767149". So i request if someone could help from the community.
Thank you in advance.