제출 #895787

#제출 시각아이디문제언어결과실행 시간메모리
895787IsamAutići (COCI22_autici)C++17
50 / 50
11 ms1860 KiB
#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 += 1ll * (n - 2) * mn; cout << sm << '\n'; return 0; }

컴파일 시 표준 에러 (stderr) 메시지

Main.cpp: In function 'int main()':
Main.cpp:13:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   13 |  for(register int i = 1; i <= n; ++i){
      |                   ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...