4490: p1102 数对

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:48 Solved:10

Description

题目背景 出题是一件痛苦的事情! 相同的题目看多了也会有审美疲劳,于是我舍弃了大家所熟悉的 A+B Problem,改用 A-B 了哈哈! 题目描述 给出一串正整数数列以及一个正整数 � C,要求计算出所有满足 � − � = � A−B=C 的数对的个数(不同位置的数字一样的数对算不同的数对)。

Sample Input Copy

4 1
1 1 2 3

Sample Output Copy

3