結果
問題 | No.549 素材合成システム |
ユーザー |
|
提出日時 | 2017-11-09 14:57:33 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 34 ms / 2,000 ms |
コード長 | 314 bytes |
コンパイル時間 | 713 ms |
コンパイル使用メモリ | 64,208 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 07:26:42 |
合計ジャッジ時間 | 3,532 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 44 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(int argc, char* argv[]) { int N; cin>>N; vector<int> x(N); int i; for (i=0;i<N;i++){ cin>>x[i]; } sort(x.begin(),x.end()); int aw=0; aw=x[N-1]; for (i=0;i<N-1;i++){ aw+=x[i]/2; } cout<<aw<<endl; return 0; }