2020.08.06【NOIP提高组】模拟:刷题计划 总结
Description
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/5d0578b227cb9463a574e68289a53788.png)
Input
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/e76c5e93a98646dd72c8e19cbfb86269.png)
Output
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/e795dcaa091554f7abe1a61d29a1e80f.png)
Sample Input
10000 12
2 1
3
2 9999
3
1 1
3
2 1
3
2 10000
3
2 9999
3
Sample Output
1
9999 1
9999
9999
10000 9999
9999 10000
Data Constraint
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/5919e4998b5eae24158f89d6de37c8bb.png)
总结
比赛思路&正解: 暴力模拟,用
h
a
s
h
hash
hash或者离散化进行判重,时间复杂度为
O
(
m
2
)
O(m^2)
O(m2)。