Submission #968780

# Submission time Handle Problem Language Result Execution time Memory
968780 2024-04-24T04:18:11 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 348 KB
#include<bits/stdc++.h>
using namespace std;

int N, M;
set<int> A;

int main() {
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    cin >> N;
    for (int i = 0; i < N; i++) {
        int x;
        cin >> x;
        A.insert(x);
    }
    int ans = 0;
    cin >> M;
    while (M--) {
        int x;
        cin >> x;
        bool liked = true;
        while (x--) {
            int y;
            cin >> y;
            if (A.count(y)) liked = false;
        }
        if (liked) ans++;
    }
    cout << ans << endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 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 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 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 1 ms 348 KB Output is correct