minsub专题

SPOJ - MINSUB——单调栈+01矩阵变换

You are given an matrix M (consisting of nonnegative integers) and an integer K. For any submatrix of M’ of M define min(M’) to be the minimum value of all the entries of M’. Now your task is simple: