結果

問題 No.549 素材合成システム
ユーザー kotatsugame
提出日時 2017-08-10 05:00:31
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 34 ms / 2,000 ms
コード長 207 bytes
コンパイル時間 700 ms
コンパイル使用メモリ 68,852 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-12 01:33:56
合計ジャッジ時間 3,540 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 44
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main()
      | ^~~~

ソースコード

diff #

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