1643 统计问题2


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

又是统计活 != =

好吧,让我们来看看这次的问题是什么。给定一个非负数列 {An} ,问你有多少对 (Ai, Aj) 满足 i < j ,且 Ai + Aj <= k 。其中 1 <= n <= 100000,数列中的数不超过 10^8 ,0 <= k <= 2*10^8。

Input

有多组测试数据,处理到文件结束。 每组数据有两行,第一行两个整数 n 和 k ,第二行 n 个非负整数,表示数列 {An} 。

Output

对于每组数据,输出一个答案。

Sample

Input

5 6
1 4 7 5 8
5 15
1 4 8 7 9

Output

2
8

Comments

There are no comments at the moment.