結果
問題 | No.804 野菜が苦手 |
ユーザー | Tlapesium |
提出日時 | 2019-03-22 21:26:49 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 436 bytes |
コンパイル時間 | 1,795 ms |
コンパイル使用メモリ | 191,948 KB |
最終ジャッジ日時 | 2025-01-06 23:42:55 |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h> #define INF 2147483647 #define INF_LL 9223372036854775807 #define MOD 1000000007 using namespace std; typedef long long int ll; typedef unsigned long long int ull; int main() { int A, B, C, D; cin >> A >> B >> C >> D; int ans = 0; while (1) { if (A == 0 || B == 0 || D == 0)break; if (B >= C && D >= C+1) { B -= C; A--; ans++; D -= C + 1; continue; } break; } cout << ans << endl; }