結果
問題 |
No.549 素材合成システム
|
ユーザー |
|
提出日時 | 2020-04-21 22:49:09 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 15 ms / 2,000 ms |
コード長 | 375 bytes |
コンパイル時間 | 898 ms |
コンパイル使用メモリ | 65,920 KB |
最終ジャッジ日時 | 2025-01-09 22:11:34 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 44 |
ソースコード
#include <iostream> void solve() { int n; std::cin >> n; int max = 0, sum = 0; while (n--) { int x; std::cin >> x; sum += x / 2; max = std::max(max, x); } std::cout << sum + (max - max / 2) << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }