Pairs
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Array of unique integers and a target value are given. Determine the number of pairs of array elements that have a difference equal to a target value .
Input
First line contains integers and . Second line contains unique integers in the range from to .
Output
Print the number of pairs of array integers with difference .
Examples
In the sample there are two pairs of numbers with difference and .
Input #1
Answer #1
Submissions 769
Acceptance rate 36%