結果
| 問題 |
No.549 素材合成システム
|
| コンテスト | |
| ユーザー |
259_Momone
|
| 提出日時 | 2017-07-28 22:48:18 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 13 ms / 2,000 ms |
| コード長 | 263 bytes |
| コンパイル時間 | 2,411 ms |
| コンパイル使用メモリ | 157,292 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-10 03:58:06 |
| 合計ジャッジ時間 | 3,397 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 44 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%lld", &N);
| ~~~~~^~~~~~~~~~~~
main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%lld", &x);
| ~~~~~^~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
long long int N, x, m, s, i;
int main(){
scanf("%lld", &N);
for(; i < N; ++i){
scanf("%lld", &x);
if(m < x)m = x;
s += x / 2;
}
cout << s - m / 2 + m << endl;
return 0;
}
259_Momone