The sums of all square submatrices on main diagonal

前端 未结 0 571
野趣味
野趣味 2021-02-19 08:50

I have a large 2D array K (its size ~5000x5000). I need to find the sums of all submatrices M[i:j, i:j] for all pairs (i,j). Unfortunately, the use of two loops works too slow.

相关标签:
回答
  • 消灭零回复
提交回复
热议问题