#2194. 3199. [Sdoi2013]escape
3199. [Sdoi2013]escape
#3199. [Sdoi2013]escape
题目描述
![image](file://1(12).jpg)
输入格式
![image](file://2(4).jpg)
输出格式
![image](file://3(2).jpg)
样例
样例输入
2
4
10 10 5 5
5 6
3 5
7 5
5 3
17
14 12 7 6
7 11
6 9
7 7
1 10
2 20
1 6
2 6
1 1
2 2
5 1
5 2
13 1
12 2
12 7
13 7
12 11
13 11
样例输出
1
2
数据范围与提示
![image](file://4(1).jpg)