Submission #975967

#TimeUsernameProblemLanguageResultExecution timeMemory
975967vjudge1Pizza (COCI21_pizza)C++17
50 / 50
1 ms596 KiB
#include <bits/stdc++.h>
using namespace std;

int main(){
    long long n, m;
    cin >> n;
    bool ts[101];
    memset(ts, false, sizeof(ts));
    long long t;
     for(int i = 0; i < n; i++){
        cin >> t;
        ts[t] = true;
    }cin >> m;
    long long k, ans = 0;
    for(int i = 0; i < m; i++){
        cin >> k;
        long long c[k];
        bool cek = true;
        for(int j = 0; j < k; j++){
            cin >> c[j];
        }for(int j = 0; j < k; j++){
            if(ts[c[j]] == true){
                cek = false;
                break;
            }
        }
        if(cek == true){
            ans++;
        }
    }cout << ans << endl;
} 
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...