# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
975630 |
2024-05-05T15:07:39 Z |
vjudge1 |
Pizza (COCI21_pizza) |
C++17 |
|
1 ms |
348 KB |
#include <iostream>
#include <vector>
#include <unordered_set>
using namespace std;
int main() {
int N;
cin >> N;
unordered_set<int> dislikedSnacks;
for (int i = 0; i < N; i++) {
int snack;
cin >> snack;
dislikedSnacks.insert(snack);
}
int M;
cin >> M;
int count = 0;
for (int i = 0; i < M; i++) {
int Ki;
cin >> Ki;
bool valid = true;
for (int j = 0; j < Ki; j++) {
int snack;
cin >> snack;
if (dislikedSnacks.count(snack)) {
valid = false;
}
}
if (valid) {
count++;
}
}
cout << count << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |