well this has happened with me in so many problems and i really don`t know the reason behind it. My code fails on a particular test but when i enter that test on my own compiler , the answer comes out to be correct .. Earlier also , this has happened with me many times. 2 days back also , i encountered the same problem as why i am getting a runtime error on test 9 of Problem 659-B http://pastebin.com/UBV4KPf0 This is the link for my code..
Today i got stuck in Problem 725B in test 7 . Again I am getting correct output in my computer but wrong on Codeforces . http://pastebin.com/WuCR3X9p Link for 725-B(My code) Can anyone help me out with this???
Codeforces compiler is fine. Your code is buggy. Read the manual http://en.cppreference.com/w/cpp/string/byte/atoi
But when i am entering the same input(test-7) in my computer , I am getting correct output..
Auto comment: topic has been updated by OneClickAC (previous revision, new revision, compare).
Provide a link to your submission.
http://codeforces.me/contest/725/submission/23265698
Your solution is correct expect you used atol which return long, but the plane is arbitrarily long and can have a row which is longer than the maximum value of long. Just find a process to convert your string to a long long. You can also read the input using scanf, which can read this as a long long.
Here is a fix to your code, just locate to atol you used. I made one change there.
Okay , i got it.. Thanks a lot :)