結果

問題 No.549 素材合成システム
ユーザー ky-on2000
提出日時 2017-11-19 16:51:16
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 268 bytes
コンパイル時間 534 ms
コンパイル使用メモリ 64,500 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-25 22:58:15
合計ジャッジ時間 2,704 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
  int n;
  cin>>n;
  vector<int> x(n);
  for(int i=0;i<n;i++)cin>>x[i];
  sort(x.begin(),x.end());
  for(int i=0;i<n-1;i++){
      x[n-1]+=(x[i]/2);
  }
  cout<<x[n-1]<<endl;
}
0