結果

問題 No.549 素材合成システム
ユーザー 👑 CleyL
提出日時 2019-09-25 20:21:34
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 328 bytes
コンパイル時間 1,077 ms
コンパイル使用メモリ 74,668 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-22 14:25:40
合計ジャッジ時間 3,572 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 14 WA * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#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 = a[0];
    for(int i = 1; n > i; i++){
        ans = ans/2+a[i];
    }
    cout << ans << endl;
}
0