Problem B: 飞翔

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:58 Solved:18

Description

Input

Output

Sample Input Copy

3 2
3
1 1
3 2
1 2

Sample Output Copy

383

Source/Category