全部评论 5

  • #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    int a,b,x,y,c,d,e,f;
    cin>>a>>b;
    cin>>x>>y;
    if(b/yx>a)cout<<"YES";
    else
    {
    cin>>c>>d;
    if(b/d
    c>a)cout<<"YES";
    else
    {
    cin>>e>>f;
    if(b/f*e>a)cout<<"YES";
    else cout<<"NO";
    }
    }
    return 0;
    }

    2024-07-13 来自 浙江

    0
  • 只吃一种,确定不会吃腻?

    2024-07-13 来自 广东

    0
  • #include <iostream>
    #include <cmath>
    using namespace std;
    int main(){
    int a, b, x, y, x2, y2, x3, y3;
    cin >> a >> b >> x >> y >> x2 >> y2 >> x3 >> y3;
    int p, p2, p3;
    if (a % x != 0){
    p = (a / x + 1) * y;
    }else{
    p = a / x * y;
    }
    这是一半,另一半自己写

    2024-07-13 来自 浙江

    0
  • #include <iostream>
    using namespace std;
    
    int main() {
        int hunger, money;
        cin >> hunger >> money;
    
        int food1_hunger, food1_price;
        int food2_hunger, food2_price;
        int food3_hunger, food3_price;
    
        cin >> food1_hunger >> food1_price;
        cin >> food2_hunger >> food2_price;
        cin >> food3_hunger >> food3_price;
    
        bool can_eat_to_full = false;
    
        if (hunger <= (money / food1_price) * food1_hunger) {
            can_eat_to_full = true;
        }
    
        if (hunger <= (money / food2_price) * food2_hunger) {
            can_eat_to_full = true;
        }
    
        if (hunger <= (money / food3_price) * food3_hunger) {
            can_eat_to_full = true;
        }
    
        if (can_eat_to_full) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    
        return 0;
    }
    

    2024-07-13 来自 广东

    0
  • 我也不会,但似乎会了

    2024-07-13 来自 浙江

    0

热门讨论