#K88582. Find Pair with Sum

    ID: 37340 Type: Default 1000ms 256MiB

Find Pair with Sum

Find Pair with Sum

Given an array of integers and an integer \(k\), determine whether there exist two distinct elements in the array whose sum equals \(k\). You should print True if such a pair exists, and False otherwise.

The input is provided via standard input (STDIN) and the output must be printed to standard output (STDOUT).

inputFormat

The input consists of two lines:

  1. The first line contains space-separated integers representing the elements of the array.
  2. The second line contains the target integer k.

outputFormat

Print True if there exists a pair of distinct indices \(i\) and \(j\) such that \(arr[i] + arr[j] = k\); otherwise, print False.

## sample
10 15 3 7
17
True

</p>