結果
| 問題 |
No.549 素材合成システム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-02-24 03:11:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 35 ms / 2,000 ms |
| コード長 | 331 bytes |
| コンパイル時間 | 879 ms |
| コンパイル使用メモリ | 74,324 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-11 02:29:04 |
| 合計ジャッジ時間 | 3,119 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 44 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int n;cin>>n;
vector<int> A(n);
for(int i = 0; n > i; i++){
cin>>A[i];
}
sort(A.begin(),A.end());
int ans = 0;
for(int i = 0; n-1 > i; i++){
ans += A[i]/2;
}
cout << ans+A[n-1] << endl;
}