結果
問題 | No.920 あかあお |
ユーザー |
![]() |
提出日時 | 2019-11-12 16:27:38 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 449 bytes |
コンパイル時間 | 1,431 ms |
コンパイル使用メモリ | 157,564 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-09-19 03:51:55 |
合計ジャッジ時間 | 4,752 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 TLE * 1 -- * 1 |
other | -- * 11 |
ソースコード
#include "bits/stdc++.h" using namespace std; int main(){ int a,b,c; cin >> a >>b >> c; int ans =0; while(a>0&&b>0){ a--; b--; ans++; } while(c>0){ if(a==1&&b==1){ a--; b--; ans++; } if(a==0){ c--; a++; } else if( b==0){ c--; b++; } } cout << ans << endl; }