Submission
Status:
PP-P-PP-PP
Subtask/Task Score:
70/100
Score: 70
User: Pera
Problemset: Ingredient Validator
Language: cpp
Time: 0.002 second
Submitted On: 2025-09-03 17:04:54
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
string season, moon, ingredient;
cin >> season >> moon >> ingredient;
bool accept = false;
if (season == "spring" || season == "summer") {
if (moon == "full") {
if (ingredient == "honey" || ingredient == "milk")
accept = true;
} else if (moon == "new") {
if (ingredient == "honey" || ingredient == "chocolate")
accept = true;
}
} else if (season == "autumn" || season == "winter") {
if (moon == "waning" || moon == "new") {
if (ingredient == "chocolate" || ingredient == "honey")
accept = true;
}
}
cout << (accept ? "Ingredient accepted!" : "Ingredient rejected!") << "\n";
return 0;
}