Count Pairs with Sum <= X

PHP Hard 4 views
Back to Questions

Problem Description

Given a sorted array and X, count pairs (i

Input Format

Line1 n X. Line2 n sorted integers.

Output Format

One integer count.

Sample Test Case

Input:
5 7 1 2 3 4 5
Output:
8

Constraints

n

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next