Submission #976343

# Submission time Handle Problem Language Result Execution time Memory
976343 2024-05-06T12:52:20 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 600 KB
#include <iostream>
using namespace std;

bool disliked[105];

int main() {
    int n, m, k, ans = 0;
    cin >> n;
    for (int i = 0, ai; i < n; i++) {
        cin >> ai;
        disliked[ai] = true;
    }
    cin >> m;
    bool okay;
    while (m--) {
        okay = true;
        cin >> k;
        for (int i = 0, bi; i < k; i++) {
            cin >> bi;
            if (disliked[bi]) okay = false;
        }
        if (okay) {
            ans++;
        }
    }
    cout << ans;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 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 600 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 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct