Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: whattt10000

Problemset: Ingredient Validator

Language: cpp

Time: 0.002 second

Submitted On: 2026-10-14 13:46:01

#include <iostream>
#include <queue>
#include <vector>
#include <iomanip>
#include <cmath>
using namespace std;

int main(){
    string season, moon, ing;
    cin>>season>>moon>>ing;
    if(season=="spring"||season=="summer"){
        if(moon=="full"){
            if(ing=="honey"||ing=="milk"){
                cout<<"Ingredient accepted!"<<endl;
                return 0;
            }
            else{
                cout<<"Ingredient rejected!"<<endl;
                return 0;
            }
        }
        else{
            if(moon=="new"&&ing!="chocolate"){
                cout<<"Ingredient rejected!"<<endl;
                return 0;
            }
            else{
                cout<<"Ingredient accepted!"<<endl;
                return 0;
            }
        }
    }
    else{
        if(season=="autumn"||season=="winter"){
            if(moon=="waning"||moon=="new"){
                if(ing=="chocolate"||ing=="milk"){
                    cout<<"Ingredient accepted!"<<endl;
                    return 0;
                }
                else{
                    cout<<"Ingredient rejected!"<<endl;
                    return 0;
                }
            }
            else{
                cout<<"Ingredient accepted!"<<endl;
                return 0;
            }
        }
        else{
            cout<<"Ingredient rejected!"<<endl;
            return 0;
        }
    }
}