With reference to the problem, http://codeforces.net/contest/721/problem/C
http://codeforces.net/contest/721/submission/21096367 -> This submission with memset giving value of 1e9+7 to 2D array gives WA on test10
whereas the same code with memset removed and the 2D array given value manually of 1e9+7 ->http://codeforces.net/contest/721/submission/21096181 gives AC.
I am completely not able to understand why?? Does anyone have any idea??