1649: 迷宫

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:1 Solved:0

Description

Sample Input Copy

3
2 3
2 4
6 8

Sample Output Copy

3
3
5

HINT