Question
Count Pairs with Sum at Most X
You are given a sorted array of
Input
The first line contains KaTeX can only parse string typed expression and KaTeX can only parse string typed expression. The second line contains KaTeX can only parse string typed expression integers in non-decreasing order.
Output
Print the number of valid pairs.
Example
Example:
Input
Input
5 7
1 2 3 5 6Output5