#C2488. Pair Sum Finder

    ID: 45809 Type: Default 1000ms 256MiB

Pair Sum Finder

Pair Sum Finder

In this problem, you are given an array of integers and a target integer. Your task is to determine whether there exist two distinct indices (i) and (j) such that [ arr[i] + arr[j] = target ] In other words, check if there exists a pair in the array whose sum equals the given target. The input will be provided via standard input and the output must be printed to standard output.

inputFormat

The first line contains a single integer (n) denoting the number of elements in the array.<br>The second line contains (n) space-separated integers representing the elements of the array.<br>The third line contains a single integer (target), the sum to be checked.

outputFormat

Print either "True" if there exists a pair of distinct elements in the array whose sum equals (target), or "False" if no such pair exists.## sample

4
2 7 11 15
9
True