Count the triplets
Very easy
Execution time limit is 2 seconds
Runtime memory usage limit is 128 megabytes
Given three array and of integers each. Find the number of triplets such that .
Input
First line contains the size of arrays . Second line contains elements of array . Next line contains elements of array . Last line contains elements of array .
Output
Print the number of triplets such that .
Examples
Input #1
Answer #1
Input #2
Answer #2
Note
In the first test we have triples and .
Submissions 1K
Acceptance rate 38%