Hi all,
My solution to problem http://codeforces.net/contest/688/problem/D
gave RuntimeError when i took array input before and then processed.
But the same code gave AC when I processed simultaenously while taking input.
I have no idea why the first code gave runtime error :(
RUNTIME ERROR CODE- http://codeforces.net/contest/688/submission/18818380
AC CODE — http://codeforces.net/contest/688/submission/18818424
Thank you :))