結果
問題 | No.920 あかあお |
ユーザー | QCFium |
提出日時 | 2019-11-08 21:29:58 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 310 bytes |
コンパイル時間 | 1,506 ms |
コンパイル使用メモリ | 166,204 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-23 03:36:30 |
合計ジャッジ時間 | 2,085 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
#include <bits/stdc++.h> int ri() { int n; scanf("%d", &n); return n; } int main() { int x = ri(), y = ri(), z = ri(); int res = std::min(x, y); x -= res; y -= res; if (z < std::max(x, y)) res += z; else res += std::max(x, y) + (z - std::max(x, y)) / 2; std::cout << res << std::endl; return 0; }