QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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;
}
Details
Tip: Click on the bar to expand more detailed information
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