Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: Gun555XD
Problemset: Ingredient Validator
Language: cpp
Time: 0.004 second
Submitted On: 2025-12-28 16:52:44
#include <bits/stdc++.h>
using namespace std;
int main() {
string season,moon,ingredient;
cin >> season >> moon >> ingredient;
if (season == "spring"|| season == "summer"){
if( moon == "full") {
if( ingredient == "honey" || ingredient == "milk" ) {
cout << "Ingredient accepted!";
}
else {
cout << "Ingredient rejected!";
}
}
else {
if ( moon == "new" && ingredient != "chocolate"){
cout << "Ingredient rejected!";
}
else {
cout << "Ingredient accepted!";
}
}
}
else {
if ( season == "autumn" || season == "winter" ){
if ( moon == "waning" || moon == "new"){
if( ingredient == "chocolate" || ingredient == "milk" ) {
cout << "Ingredient accepted!";
}
else {
cout << "Ingredient rejected!";
}
}
else {
cout << "Ingredient accepted!";
}
}
else {
cout << "Ingredient rejected!";
}
}
return 0;
}