100 atcoder#ABC202C. [ABC202C] Made Up
[ABC202C] Made Up
Score : points
Problem Statement
Given are three sequences of length each: , , and , consisting of integers between and (inclusive).
How many pairs of integers between and (inclusive) satisfy ?
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the number of pairs such that .
3
1 2 2
3 1 2
2 3 2
4
Four pairs satisfy the condition: .
4
1 1 1 1
1 1 1 1
1 2 3 4
16
All the pairs satisfy the condition.
3
2 3 3
1 3 3
1 1 1
0
No pair satisfies the condition.