Problem F: 问题三
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:130
Solved:78
Description
在一个抽奖箱中放了n张奖券,每张均有唯一编号i,另外奖券上还有一个号码a[i],现在将进行两次抽奖,每次从箱中拿出一个奖券,记录其号码 a[i],然后放回箱中继续。问两次抽到的号码和为 sum 的情况有多少种?
Input
第一行两个整数 n(n<=100)和sum, 第二行 n 个整数 a[i]。
Output
一个整数,表示方案总数.
Sample Input Copy
5 7
1 2 3 4 5
Sample Output Copy
4