# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
895785 | 2023-12-30T20:32:25 Z | Isam | Autići (COCI22_autici) | C++17 | 8 ms | 604 KB |
#include<bits/stdc++.h> using namespace std; constexpr int sz = 100005; int n; int d[sz]; signed main(){ ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); cin >> n; long long sm(0); int mn{(int)1e9 + 7}; for(register int i = 1; i <= n; ++i){ cin >> d[i]; sm += d[i]; mn = min(mn, d[i]); } sm += (n - 2) * mn; cout << sm << '\n'; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Correct | 4 ms | 604 KB | Output is correct |
3 | Incorrect | 8 ms | 604 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Incorrect | 1 ms | 344 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Correct | 4 ms | 604 KB | Output is correct |
3 | Incorrect | 8 ms | 604 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |