結果

問題 No.549 素材合成システム
ユーザー tetsuzuki1115
提出日時 2018-03-21 17:43:20
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 558 bytes
コンパイル時間 814 ms
コンパイル使用メモリ 88,772 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-24 19:35:44
合計ジャッジ時間 3,142 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <cmath>
#include <limits.h>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <functional>
#include <stdio.h>
using namespace std;

long long MOD = 1000000007;

int main() {
    int N;
    cin >> N;
    vector<int> V(N);
    for ( int i = 0; i < N; i++ ) {
        cin >> V[i];
    }
    sort( V.begin(), V.end() );
    for ( int i = 0; i < N-1; i++ ) {
        V[N-1] += V[i]/2;
    }
    cout << V[N-1] << endl;
    return 0;
}
0