Recently I was working on Greedy problems and I encountered one of the very prominent problem of runtime error while submitting soln to ques .
Problems are : http://codeforces.net/problemset/problem/494/A http://codeforces.net/problemset/problem/723/D
Probable reason I could think of is corrupt memory access but Locally they are running well .
My soln to the problem are:
http://codeforces.net/contest/494/submission/21373511 http://codeforces.net/contest/723/submission/21299381
Any help is Appreciated .
Start with this to find problem locally.