Problems > Matrix Rank mod p > Editorial

Matrix Rank mod p — Solution & Editorial

Back to the Problem

Row-reduce modulo the prime; the rank is the number of nonzero pivot rows.

Complexity: O(N·M·min(N,M))