QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#497465 | #9142. Uniting Amoebas | rgnerdplayer | WA | 0ms | 3520kb | C++20 | 456b | 2024-07-29 09:19:22 | 2024-07-29 09:19:23 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
auto solve = [&]() {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
cout << accumulate(a.begin(), a.end(), 0LL) - *max_element(a.begin(), a.end()) << '\n';
};
solve();
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3520kb
input:
3 3 1 1 1 4 0 1 0 2 2 100 42
output:
2
result:
wrong answer Answer contains longer sequence [length = 3], but output contains 1 elements