結果

問題 No.549 素材合成システム
ユーザー olphe
提出日時 2017-07-28 22:22:02
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 901 bytes
コンパイル時間 1,045 ms
コンパイル使用メモリ 111,376 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-10 05:01:00
合計ジャッジ時間 2,980 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "math.h"
#include "utility"
#include "string"
#include "map"
#include "unordered_map"
#include "iomanip"
#include "random"

using namespace std;
const long long int MOD = 1000000007;

long long int power(long long int x, long long int n, long long int M) {
	long long int tmp = 1;

	if (n > 0) {
		tmp = power(x, n / 2, M);
		if (n % 2 == 0) tmp = (tmp*tmp) % M;
		else tmp = (((tmp*tmp) % M)*x) % M;
	}
	return tmp;
}

long long int N, M, K, Q, W, H, L, R;
long long int ans;


int main() {
	ios::sync_with_stdio(false);
	cin >> N;
	long long int num[100001] = {};
	for (int i = 0; i < N; i++) {
		cin >> num[i];
	}
	sort(num, num + N);
	for (int i = 0; i < N - 1; i++) {
		num[N - 1] += num[i] / 2;
	}
	cout << num[N - 1] << endl;
	return 0;
}
0