結果
問題 | No.549 素材合成システム |
ユーザー |
![]() |
提出日時 | 2017-08-17 08:27:13 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 34 ms / 2,000 ms |
コード長 | 365 bytes |
コンパイル時間 | 1,468 ms |
コンパイル使用メモリ | 163,232 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-14 13:23:40 |
合計ジャッジ時間 | 4,104 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 44 |
ソースコード
#include <bits/stdc++.h> #define REP(i, a, n) for(ll i = ((ll) a); i < ((ll) n); i++) using namespace std; typedef long long ll; int a,n,ans=0; vector<int> x; int main(void) { cin >> n; REP(i, 0, n) cin >> a, x.push_back(a); sort(x.begin(), x.end()); ans = *(x.end()-1); REP(i, 0, n-1) ans += x[i]/2; cout << ans << endl; return 0; }