Submission #701321

# Submission time Handle Problem Language Result Execution time Memory
701321 2023-02-20T21:32:45 Z delrey Autići (COCI22_autici) C++14
50 / 50
39 ms 1324 KB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long n, a, minn = 1000000000, sum = 0;
    cin>>n;
    for(int i = 0; i < n; i++)
    {
        cin>>a;
        minn = min(a, minn);
        sum += a;
    }
    sum -= minn;
    long long res = sum + minn * (n - 1);
    cout<<res<<endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 12 ms 480 KB Output is correct
3 Correct 36 ms 1288 KB Output is correct
4 Correct 32 ms 1072 KB Output is correct
5 Correct 37 ms 1160 KB Output is correct
6 Correct 30 ms 1040 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 308 KB Output is correct
7 Correct 1 ms 304 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 308 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 12 ms 480 KB Output is correct
3 Correct 36 ms 1288 KB Output is correct
4 Correct 32 ms 1072 KB Output is correct
5 Correct 37 ms 1160 KB Output is correct
6 Correct 30 ms 1040 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 308 KB Output is correct
13 Correct 1 ms 304 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 308 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 12 ms 484 KB Output is correct
22 Correct 36 ms 1288 KB Output is correct
23 Correct 37 ms 1228 KB Output is correct
24 Correct 33 ms 1184 KB Output is correct
25 Correct 36 ms 1180 KB Output is correct
26 Correct 32 ms 1172 KB Output is correct
27 Correct 34 ms 1164 KB Output is correct
28 Correct 39 ms 1040 KB Output is correct
29 Correct 37 ms 1324 KB Output is correct
30 Correct 36 ms 1180 KB Output is correct