1635: 找和为K的两个元素

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

在一个长度为n(n < 1000)的整数序列中,判断是否存在某两个元素之和为k。

Input

第一行输入序列的长度n和k,用空格分开。
第二行输入序列中的n个整数,用空格分开。

Output

如果存在某两个元素的和为k,则输出yes ,否则输出no。

Sample Input Copy

9 10

Sample Output Copy

1 2 3 4 5 6 7 8 9

Source/Category