#z1022. 公交路线(route)

公交路线(route)

Description

image Given two integers x and y, print the sum.

Format

Input

image Two integers x and y, satisfying 0x,y327670\leq x,y\leq 32767 .

Output

第一行表示平时情况的方案数。 接下来m行分别表示各次询问情况下的方案数。

Samples

样例输入1

6 6 2
2 1 2 1 2 2
1 2
1 3
2 4
2 5
2 6
1 
2 
3 
4 
5 
6

样例输出1

2
0
1
0
1
1
1

大样例 ex_route2.in ex_route2.ans

Limitation

image

1s, 512MiB for each test case.