QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#497465#9142. Uniting AmoebasrgnerdplayerWA 0ms3520kbC++20456b2024-07-29 09:19:222024-07-29 09:19:23

Judging History

你现在查看的是最新测评结果

  • [2024-07-29 09:19:23]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3520kb
  • [2024-07-29 09:19:22]
  • 提交

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