Submission #388232

# Submission time Handle Problem Language Result Execution time Memory
388232 2021-04-10T15:46:32 Z phathnv Pizza (COCI21_pizza) C++11
50 / 50
1 ms 316 KB
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

const int N = 107;

int n, m, d[N];

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    cin >> n;
    for(int i = 1; i <= n; i++){
        int a;
        cin >> a;
        d[a] = 1;
    }
    int answer = 0;
    cin >> m;
    for(int i = 1; i <= m; i++){
        int k;
        cin >> k;
        bool no = 0;
        while (k--){
            int b;
            cin >> b;
            no |= d[b];
        }
        if (!no)
            answer++;
    }
    cout << answer;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 316 KB Output is correct
2 Correct 0 ms 208 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct