← 返回 snowflake 的题目列表Minimize Marbles in Grid
类型:online_judge
You have a grid grid[][] containing characters 'X' and 'O'. 'X' represents marbles. You can remove a marble if there are other marbles in the same row or column. The goal is to minimize the number of marbles left in the grid. Implement a function to compute the minimum number of marbles remaining.
Example
Input
4
XOXX
OXOX
XOOX
XXOX