1773: 2.1-6184:找和为K的两个元素

Memory Limit:64 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:122 Solved:85

Description

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

Input

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

Output

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

Sample Input Copy

9 10
1 2 3 4 5 6 7 8 9

Sample Output Copy

yes

加入题单

算法标签: