Fast checking Matrix multiplication in mod 10
I got Accepted by using Freivald's algorithm as suggested by @David Richerby. Thank you very much !

I have not tested the brute-force solution using Coppersmith-Winograd algorithm yet. Will report in a couple of days, by the way I think it might not get Accepted but possibly will gain a fairly amount of points.

For those who want to check your implementation, submit your code on http://vn.spoj.com/problems/VMATRIX/. The problem statement is in Vietnamese, so here is the short description of input format:


  
  First line is number of testcase (the example gives 2 testcases)
  For each testcase: 
  the first line is size of 3 matrices, N. In 20% testcase N &lt;= 100. 
  next N * N lines: matrix A
  next N * N lines: matrix B
  next N * N lines: matrix C
  


Output: YES or NO for the result.