Pivot columns
Work over \(\mathbb F_p\), where \(p=1\,000\,000\,007\).
Given an \(n\times m\) matrix \(A\), find the pivot columns produced by
Gaussian elimination from left to right. Columns are numbered from \(0\).
Input
The first line contains \(n\) and \(m\). The next \(n\) lines contain \(A\).
Output
Print the number \(r\) of pivot columns, followed by their indices in strictly
increasing order. The indices must be the pivot columns of the RREF of \(A\).
Constraints
- \(1\le n,m\le 200\)
- Every matrix entry is an integer in \([0,p)\)