Page 1 of 1

PLEASE Write Comments AND Pseudo Code with the code!!! Element Pair Number Problem 1: Introduction Problem description a

Posted: Mon May 09, 2022 5:54 am
by answerhappygod
PLEASE Write Comments AND Pseudo Code with the code!!!
Element Pair Number Problem
1: Introduction
Problem description and (if any) background of the
algorithms.
Description:
Given N integers Ai and a positive integer C, how many pairs of
i and j satisfying Ai-Aj=C?
Input:
In the first line, enter the integers N and C separated by two
spaces. Lines 2~N+1 contain an integer Ai in each line.
Output:
A number to represent the answer
Sample Input
Sample Output