#C3282. Pair Sum Checker

    ID: 46692 Type: Default 1000ms 256MiB

Pair Sum Checker

Pair Sum Checker

Given an array of integers and a target integer, determine whether there exist two distinct integers in the array such that their sum equals the target. In mathematical terms, you need to check if there exist two indices i and j with i \neq j for which

ai+aj=targeta_i + a_j = target

Your solution should be efficient enough to handle large inputs.

inputFormat

The input is given via standard input (stdin) and consists of two lines:

  1. The first line contains space-separated integers representing the array.
  2. The second line contains a single integer representing the target value.

outputFormat

Output a single line to standard output (stdout) with either "True" if there exist two distinct integers in the array whose sum equals the target, or "False" otherwise.## sample

2 7 11 15
9
True