結果
問題 |
No.549 素材合成システム
|
ユーザー |
|
提出日時 | 2018-06-22 16:28:18 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 34 ms / 2,000 ms |
コード長 | 315 bytes |
コンパイル時間 | 629 ms |
コンパイル使用メモリ | 73,008 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-30 17:59:46 |
合計ジャッジ時間 | 3,483 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 44 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main(){ int N; cin >> N; int x[N]; for(int i = 0; i < N; i++){ cin >> x[i]; } sort(x, x + N); for(int i = 0; i < N - 1; i++){ x[N - 1] += x[i] / 2; } cout << x[N - 1] << endl; }