#C1194. Find Pair with Given Sum
Find Pair with Given Sum
Find Pair with Given Sum
You are given an array of integers and a target sum (T). Your task is to determine whether there exist two distinct indices (i) and (j) such that (arr[i] + arr[j] = T).
Input is read from stdin and output must be written to stdout. Print True if such a pair exists, otherwise print False.
inputFormat
The first line contains two integers: (n) (the number of elements) and (T) (the target sum). The second line contains (n) space-separated integers representing the array.
outputFormat
Output a single line containing either True or False depending on whether there exists a pair of distinct indices (i) and (j) such that (arr[i] + arr[j] = T).## sample
4 9
2 7 11 15
True