Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Karatat007

Problemset: Ingredient Validator

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-24 14:52:57

#include <bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    
    string season,moon,ingredient;
    cin>>season >> moon >> ingredient;
    if(season=="spring" or season=="summer") {
        if (moon=="full"){
            if (ingredient == "honey" or ingredient == "milk") cout << "Ingredient accepted!";
            else cout << "Ingredient rejected!";
        }
        else if (moon =="new" and ingredient != "chocolate") cout << "Ingredient rejected!";
        else cout << "Ingredient accepted!";
    }
    else {
        if(season == "autumn" or season == "winter"){
            if(moon == "waning" or moon=="new"){
                if(ingredient == "chocolate" or ingredient == "milk") cout << "Ingredient accepted!";
                else cout << "Ingredient rejected!";
            }
            else cout << "Ingredient accepted!";
        }
        else cout << "Ingredient rejected!";
    }
}