Submission #1135198

#TimeUsernameProblemLanguageResultExecution timeMemory
1135198antoniusfahriPizza (COCI21_pizza)C++20
50 / 50
0 ms328 KiB
#include <iostream> #include <set> using namespace std; int main() { int n; cin >> n; set<int> disliked_toppings; for (int i = 0; i < n; ++i) { int topping; cin >> topping; disliked_toppings.insert(topping); } int m; cin >> m; int valid_pizza_count = 0; for (int i = 0; i < m; ++i) { int k; cin >> k; bool valid = true; for (int j = 0; j < k; ++j) { int topping; cin >> topping; if (disliked_toppings.count(topping) > 0) { valid = false; } } if (valid) { valid_pizza_count++; } } cout << valid_pizza_count << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...