結果

問題 No.549 素材合成システム
ユーザー reitetsuohreitetsuoh
提出日時 2017-12-27 17:00:01
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 302 bytes
コンパイル時間 649 ms
コンパイル使用メモリ 64,556 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-21 07:52:17
合計ジャッジ時間 3,675 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

#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 X=x[N-1];
	for (i=0;i<N-1;i++){
		X+=x[i]/2;
	}
	cout<<X<<endl;
	return 0;
}
0