4283: A-B问题
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:98
Solved:20
Description
给出一串正整数数列以及一个正整数 C,要求计算出所有满足 A−B=C 的数对的个数(不同位置的数字一样的数对算不同的数对)。
Input
输入共两行。
第一行,两个正整数 N,C。
第二行,N 个正整数,作为要求处理的那串数。
第一行,两个正整数 N,C。
第二行,N 个正整数,作为要求处理的那串数。
Output
一行,表示该串正整数中包含的满足 A−B=C 的数对的个数
Sample Input Copy
4 1
1 1 2 3
Sample Output Copy
3
HINT
对于 的数据,。
对于 的数据,,,。