The code I have writen is giving correct answer in my compiler but giving wrong answer in codeforces compiler
question:http://codeforces.com/problemset/problem/676/C mysubbmission:http://codeforces.com/contest/676/submission/20293649 In the first test case my compiler is giving output 4 where as codeforces is giving output as -1.