結果

問題 No.804 野菜が苦手
ユーザー KotRmKotRm
提出日時 2019-03-28 11:51:37
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,216 bytes
コンパイル時間 1,171 ms
コンパイル使用メモリ 144,780 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-08-02 19:00:08
合計ジャッジ時間 2,169 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 WA -
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,384 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 WA -
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 1 ms
4,376 KB
testcase_19 AC 2 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <algorithm>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define VRSORT(v) sort(v.rbegin(), v.rend());
#define ll long long
#define pb(a) push_back(a)
#define INF 999999999
#define MOD (ll)(1e9+7)
#define MAX (ll)(1e5*2+200)
#define print(x) cout << x << endl;
#define length(arr) sizeof arr / sizeof arr[0];
#define printArr(arr) REP(i, (sizeof arr / sizeof arr[0])){print(arr[i])}
#define printVec(vec) REP(i, vec.size()){print(vec[i])}
#define VMAX(v) max_element(v.rbegin(), v.rend())

using namespace std;


int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    std::priority_queue<ll, vector<ll>, greater<ll>> q;
    std::priority_queue<ll> r;
    
    ll A, B, C, D;
    cin >> A >> B >> C >> D;
    
    ll ans = 0;
    int flag = 0;
    while(flag == 0){
        if(ans > D/(1+C) || ans > A || ans > B){
            flag = 1;
            ans -= 1;
        }else{
            ans += 1;
        }  
    }    
    
    print(ans);
    
    return 0;
}
0