Sum

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

Consider an $N$-element strictly increasing integer sequence $A$ and an integer $S$.

Write a program to count the number of pairs of elements of $A$ whose sum is $S$.

입력

The first line of input contains $N$ and $S$, the length of the sequence and the required sum ($1 \le N \le 100\,000$, $0 \le S \le 2\,000\,000$). The following $N$ lines contain elements of the sequence, one element $A_i$ ($0 \le A_i \le 1\,000\,000$) on each line. The elements are distinct and ordered increasingly.

출력

The only line of output should contain the number of pairs that consist of two distinct elemets of the sequence and sum to $S$.