import strutils, sequtils proc gauss(a: var seq[seq[int]]): int = let (n, m) = (a.len, a[0].len) var rk = 0 for j in 0..<(m - 1): var pv = -1 for i in rk..= 0: swap(a[rk], a[pv]) for i in (rk + 1).. 0: rk = -1 break return rk proc main() = let nmx = stdin.readLine.strip.split.map(parseInt) (n, m, x) = (nmx[0], nmx[1], nmx[2]) a = stdin.readLine.strip.split.map(parseInt) lrs = (0..