結果

問題 No.804 野菜が苦手
コンテスト
ユーザー TAISA_
提出日時 2019-03-22 21:22:08
言語 C++14
(gcc 13.3.0 + boost 1.89.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 493 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,275 ms
コンパイル使用メモリ 162,604 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-12-06 14:40:18
合計ジャッジ時間 2,074 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
#define mp make_pair
#define all(vec) vec.begin(), vec.end()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll INF = 1LL << 30;
const ll LINF = 1LL << 60;
const double eps = 1e-9;
const ll MOD = 1000000007LL;
int main() {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    int ans = 0;
    for(int i = 0; i <= a; i++) {
        if(i * c > b) continue;
        if(i * (c + 1) > d) continue;
        ans = i;
    }
    cout << ans << endl;
}
0