#3236. Intersection
0
Intersection
Intersection
题目描述
You are given sequences of length each: and .
Find the number of integers satisfying the following condition:
holds for every integer such that .
输入格式
Input is given from Standard Input in the following format:
输出格式
Print the answer.
2
3 2
7 5
3
3
1 5 3
10 7 3
0
3
3 2 5
6 9 8
2
提示
All values in input are integers. must satisfy both and .
There are three such integers: , , and .
There may be no integer satisfying the condition.
标签: AtCoder|abc199B
来源
AtCoder|abc199B