CF701B Cells Not Under Attack
题目描述
给定一个 $n \times n$ 的棋盘和 $m$ 个车以及这 $m$ 个车的坐标,问在放下第 $i$ 个车的时候,有多少个格子不会被已放下的车攻击到。
输入格式
第 $1$ 行输入两个数 $n$ 和 $m$;
第 $2$ 行到第 $m+1$ 行,输入第 $i$ 个车的坐标 $x_{i}$ 和 $y_{i}$ 。
输出格式
输出 $m$ 个数字,第 $i$ 个数字表示放置 $i$ 个车后不会被攻击到的格子数量。
说明/提示
On the picture below show the state of the board after put each of the three rooks. The cells which painted with grey color is not under the attack.
