Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: cyblox_boi
Problemset: Ingredient Validator
Language: cpp
Time: 0.002 second
Submitted On: 2025-12-29 22:10:12
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
string season, moon, ingredient;
cin >> season >> moon >> ingredient;
bool isAccepted = false;
if (season == "spring" || season == "summer")
{
if (moon == "full")
{
if (ingredient == "honey" || ingredient == "milk")
{
isAccepted = true;
}
}
else
{
if (moon != "new" || ingredient == "chocolate")
{
isAccepted = true;
}
}
}
else
{
if (season == "autumn" || season == "winter")
{
if (moon == "waning" || moon == "new")
{
if (ingredient == "chocolate" || ingredient == "milk")
{
isAccepted = true;
}
}
else
{
isAccepted = true;
}
}
}
if (isAccepted)
{
cout << "Ingredient accepted!";
}
else
{
cout << "Ingredient rejected!";
}
cout << '\n';
return 0;
}