結果

問題 No.804 野菜が苦手
ユーザー niuez
提出日時 2019-03-22 21:23:22
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 362 bytes
コンパイル時間 1,493 ms
コンパイル使用メモリ 158,040 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-19 02:41:32
合計ジャッジ時間 2,196 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 16 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++)
#define all(x) x.begin(),x.end()

int main() {
  i64 a,b,c,d;
  cin >> a >> b >> c>> d;
  i64 ans = 0;
  for(int i = 0;i <= d;i++) {
    i64 m = i;
    if(m <= b) {
      ans = max(ans , min(a, m / c));
    }
  }
  cout << ans << endl;
}
0