結果
問題 |
No.549 素材合成システム
|
ユーザー |
![]() |
提出日時 | 2017-08-29 00:28:28 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 40 ms / 2,000 ms |
コード長 | 241 bytes |
コンパイル時間 | 2,246 ms |
コンパイル使用メモリ | 195,440 KB |
最終ジャッジ日時 | 2025-01-05 02:34:34 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 44 |
ソースコード
#include "bits/stdc++.h" using namespace std; int main() { int n,i,x[100001]; cin>>n; memset(x,100001,sizeof(x)); for(i=n;i--;)cin>>x[i]; sort(x,x+n,greater<int>()); for(i=n-1;i>=1;i--)x[0]+=x[i]/2; cout<<x[0]<<endl; return 0; }