There's Wrong Answer on test case 14 I tried to solve it But What's in Code wrong that lead to print 146 instead of 120 Code : https://ideone.com/gwUN8C Problem : http://codeforces.net/contest/186/problem/B Submission : http://codeforces.net/contest/186/submission/30480217