logo AlgoBeat OnlineJudge
登录 注册

#104995. [BZOJ 4995] [Usaco2017 Feb]Why Did the Cow Cross the Road

内存限制:512 MiB 时间限制:1000 ms 标准输入输出
题目类型:传统 评测方式:无测试数据
上传者: 匿名

样例

样例输入

5 4
7
8
6
2
9
2 5
4 9
0 3
8 13

样例输出

3