Giving wrong ans for some test cases :( , please check
@Muskan-Gupta-598128740703036
the way you filled col array with sum of elements diagonally in wrong. Change line 21 to 28 with these line
for(int i=0;i<n;i++) {
long temp=arr[i];
for(int c=i+1;c<n;c++) {
temp = temp + arr[c];
col[i][c] = temp%100;
}
}
but same code giving wrong ans at spoj
and passing here correctly :\
@Muskan-Gupta-598128740703036
Provide me link of this question at spoj. There must be some corner case left.
accepted , there were test cases