#t285. 找和为K的两个元素
找和为K的两个元素
Two Elements Summing to K
Problem Background
Special for beginners, ^_^
Problem Description
In an integer sequence of length (), determine whether there exist two elements whose sum is ().
Input Format
The first line contains the length of the sequence and , separated by a space.
The second line contains the non-negative integers of the sequence, each less than , separated by spaces.
Output Format
If there exist two elements whose sum is , output yes; otherwise output no.
Sample Input
9 10
1 2 3 4 5 6 7 8 9
Sample Output
yes
Constraints
Time limit: 1s, memory limit: 1024KiB for each test case.