U466380 [BalkanOI 1999] The Flip Game 翻转游戏(民间数据)

题目背景

如果认为题目或数据有任何问题,[私信](https://www.luogu.com.cn/chat)我或在[我的留言墙](https://oier.fandom.com/zh/wiki/%E7%95%99%E8%A8%80%E5%A2%99:Zzethld)留言。

题目描述

There is an ancient solitaire game named "the flip game". It consists of an array of $M$ rows and $9$ columns of two-colored pegs, with a black and a white side. When a peg with its white side showing is flipped, it shows its black side, and the other way around. In each move of the game the player flips an entire row or an entire column. The objective of the game is to leave as few pegs on their black side on the board as possible, by doing any number of moves.

输入格式

The first line contains one positive integer number $M$ ($1\le M\le1000$), denoting the number of rows in the game board. The next $M$ consecutive lines contain exactly $9$ characters, which are "0"s or "1"s, separated by one space character, where "0" means a peg showing its white side and "1" means a peg showing its black side.

输出格式

There will be only one line of text, containing the minimum possible number of pegs showing their black side, which are left on the game board.

说明/提示

对于20%的数据,$M\le5$。 对于另外20%的数据,$M\le100$。 对于100%的数据,$M\le10000$。 测试数据非常的水,应该什么乱搞做法都能碾过去。 BalkanOI 1999 Day1T2