CF583A Asphalting Roads
题目描述
有一个边长为$n$的正方形的城市,一个小组要在这个城市的路上铺上柏油路。一共要进行$n^2$天,小组第$i$天要铺两条道路$h_i$和$v_i$。如果当天要铺的两条路道路都没被铺过则将这两条道路铺上柏油路,否则则什么都不干。根据施工的时间表,告诉这条道路将在哪几天里被铺上柏油路。
输入格式
第一行一个数n$(1
输出格式
一行若干个数,哪几天里会被铺上柏油路(天数从1开始算)
#### Translate by @zky06
说明/提示
In the sample the brigade acts like that:
1. On the first day the brigade comes to the intersection of the 1-st horizontal and the 1-st vertical road. As none of them has been asphalted, the workers asphalt the 1-st vertical and the 1-st horizontal road;
2. On the second day the brigade of the workers comes to the intersection of the 1-st horizontal and the 2-nd vertical road. The 2-nd vertical road hasn't been asphalted, but as the 1-st horizontal road has been asphalted on the first day, the workers leave and do not asphalt anything;
3. On the third day the brigade of the workers come to the intersection of the 2-nd horizontal and the 1-st vertical road. The 2-nd horizontal road hasn't been asphalted but as the 1-st vertical road has been asphalted on the first day, the workers leave and do not asphalt anything;
4. On the fourth day the brigade come to the intersection formed by the intersection of the 2-nd horizontal and 2-nd vertical road. As none of them has been asphalted, the workers asphalt the 2-nd vertical and the 2-nd horizontal road.