harows专题

A - Crazy Rows SPOJ - HAROWS

题目: You are given an N x N matrix with 0 and 1 values. You can swap any two adjacentrows of the matrix. Your goal is to have all the 1 values in the matrix below or on the main diagonal. That is, fo