3133: 5-两数之和
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:1
Solved:1
Description
给你 N 个整数,问其中是否存在两个不同位置的数,加起来等于 K。
存在输出 YES,否则输出 NO。
必须用双重循环暴力枚举。
存在输出 YES,否则输出 NO。
必须用双重循环暴力枚举。
Input
第一行:N K
第二行:N 个整数
第二行:N 个整数
Output
YES 或 NO
Sample Input Copy
4 5
1 2 3 4
Sample Output Copy
YES