编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#22262 | #1119. Rhodoks的2-sum问题 | Compile Error | 0 | 0 ms | 0 K | C++ 11 / 443 B | 电类937权冬瑞 | 2020-02-12 10:14:40 |
#include <iostream>
#include <set>
using namespace std;
int main() {
int n, k, x;
int flag = 0;
cin >> n >> k;
set<int> a;
for (int i = 0; i < n; i++) {
cin >> x;
int t = a.count(k - x);
a.insert(x);
if (t) {
flag = 1;
break;
}
}
if (flag == 1) {
cout << "Yes";
} else {
cout << "No";
return 0;
}
编译信息
/sandbox/1/a.cpp: In function 'int main()':
/sandbox/1/a.cpp:23:1: error: expected '}' at end of input
}
^
/sandbox/1/a.cpp:4:12: note: to match this '{'
int main() {
^