#z1022. 公交路线(route)
公交路线(route)
Description
Given two integers x and y, print the sum.
Format
Input
Two integers x and y, satisfying .
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
1s, 512MiB for each test case.
相关
在下列比赛中: