Submission #976631

# Submission time Handle Problem Language Result Execution time Memory
976631 2024-05-06T23:23:55 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 348 KB
#include <bits/stdc++.h>

using namespace std;

int main() {
    int n; cin >> n;
    bool cek[101];
    memset(cek, false, sizeof(cek));
    for (int i=0;i<n;i++) {
        int a; cin >> a;
        cek[a] = true;
    }
    int m; cin >> m;
    int ans = 0;
    for(int i=0;i<m;i++) {
        int k; cin >> k;
        bool ada = false;
        for (int j=0;j<k;j++) {
            int b; cin >> b;
            if (cek[b]) ada = true;
        }
        if (!ada)ans++;
    }
    cout << ans << endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 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 0 ms 348 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 0 ms 344 KB Output is correct