QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#112280 | #6605. The Witchwood | zararaza | Compile Error | / | / | C++17 | 442b | 2023-06-11 01:18:40 | 2023-06-11 01:18:44 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-06-11 01:18:44]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-06-11 01:18:40]
- 提交
answer
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
#define int long long
int mas[1050];
int main() {
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
int n, k; cin >> n >> k;
for (int i = 0; i < n; i++) cin >> mas[i];
sort(mas, mas + n, greater<int>());
int s = 0; for (int i = 0; i < k; i++) s += mas[i];
cout << s << endl;
return 0;
}
Details
cc1plus: error: ‘::main’ must return ‘int’