結果
問題 |
No.549 素材合成システム
|
ユーザー |
![]() |
提出日時 | 2017-07-28 22:29:52 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 34 ms / 2,000 ms |
コード長 | 773 bytes |
コンパイル時間 | 1,369 ms |
コンパイル使用メモリ | 162,016 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-10 05:06:41 |
合計ジャッジ時間 | 3,498 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 44 |
ソースコード
//#define __USE_MINGW_ANSI_STDIO 0 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<ll> VL; typedef vector<VL> VVL; typedef pair<int, int> PII; #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i) #define REP(i, n) FOR(i, 0, n) #define ALL(x) x.begin(), x.end() #define IN(a, b, x) (a<=x&&x<b) #define MP make_pair #define PB push_back #define INF (1LL<<30) #define LLINF (1LL<<60) #define PI 3.14159265359 #define EPS 1e-12 //#define int ll int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0}; int a[100010]; signed main(void) { int n; cin >> n; REP(i, n) cin >> a[i]; sort(a, a+n, greater<int>()); FOR(i, 1, n) { a[0] += a[i]/2; } cout << a[0] << endl; return 0; }