結果
問題 | No.549 素材合成システム |
ユーザー |
|
提出日時 | 2017-07-28 23:56:00 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 18 ms / 2,000 ms |
コード長 | 852 bytes |
コンパイル時間 | 2,519 ms |
コンパイル使用メモリ | 92,184 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-10 06:54:59 |
合計ジャッジ時間 | 3,753 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 44 |
ソースコード
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> #define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++) using namespace std; typedef long long int ll; typedef vector<int> VI; typedef vector<ll> VL; typedef pair<int, int> PI; const ll mod = 1e9 + 7; int main(void) { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; VI x(n); REP(i, 0, n) { cin >> x[i]; } sort(x.rbegin(), x.rend()); REP(i, 1, n) { x[0] += x[i] / 2; } cout << x[0] << "\n"; }