結果

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

ソースコード

diff #
raw source code

#include <bits/stdc++.h>

#define foreach(i, v) for(__typeof((v).begin()) i = (v).begin(); i != (v).end(); ++ i)
#define BETWEEN(a, x, b) (a<=x&&x<b)

using namespace std;
typedef long long ll;

int main(int argc, char *argv[]) {
  ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

  int a,b,c,d;cin>>a>>b>>c>>d;
  int res = 0;
  for (int i=0;i<=a;i++){
    if (i * c > b) break;
    if(i + i * c > d) break;
    res = i;
  }
  cout<<res<<endl;

  return 0;
}
0