I submitted a solution for the problem "http://codeforces.com/problemset/problem/14/B" Though the solution has a logical bug, It ran perfectly in my system (gave a output) but when submitted here it gave a runtime error. This happens sometimes with my friend also here. Can anyone help me with how this happened.
Submissions: http://codeforces.com/contest/14/submission/11125428 (without '#define's)
(All other submissions) http://codeforces.com/contest/14/submission/11123710 http://codeforces.com/contest/14/submission/11123757 http://codeforces.com/contest/14/submission/11123811 http://codeforces.com/contest/14/submission/11123825 http://codeforces.com/contest/14/submission/11124124 http://codeforces.com/contest/14/submission/11125233
Thanks in advance