There’s an integer overflow on line 78:
mat[i-1][j-1]*mat[0][j]
but even after fixing that, it’s still not right ![]()
Edit:
The two occurrences of
ans+=(mat[i][k]%MOD)
can also be made to overflow.
Edit2:
There’s an integer overflow on line 78:
mat[i-1][j-1]*mat[0][j]
but even after fixing that, it’s still not right ![]()
Edit:
The two occurrences of
ans+=(mat[i][k]%MOD)
can also be made to overflow.
Edit2: