結果
問題 | No.920 あかあお |
ユーザー |
|
提出日時 | 2020-11-08 01:47:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 504 bytes |
コンパイル時間 | 879 ms |
コンパイル使用メモリ | 81,980 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-22 14:59:34 |
合計ジャッジ時間 | 1,262 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
#include <algorithm> #include <cmath> #include <cstdio> #include <deque> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; #define MOD 1000000007 int main() { int x, y, z; cin >> x >> y >> z; int ans = 0; for (int i = 0; i <= z; ++i) { int r = i, b = z - i; int res = min(x + r, y + b); ans = max(ans, res); } cout << ans << endl; return 0; }