結果
問題 | No.920 あかあお |
ユーザー |
![]() |
提出日時 | 2019-11-08 21:30:22 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 404 bytes |
コンパイル時間 | 2,183 ms |
コンパイル使用メモリ | 193,100 KB |
最終ジャッジ日時 | 2025-01-08 02:30:12 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; typedef long double ld; #define rep(i,n) for(int i = 0; i < (n); i++) #define all(x) x.begin(),x.end() #define DEBUG int main() { int x, y, z; cin >> x >> y >> z; for(int i = z; i > 0; i--) { if(x < y) { x++; z--; } else { y++; z--; } } int ans = min(x, y); cout << ans << endl; return 0; }