This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define nl "\n"
#define ll long long
#define str string
#define dl double
#define ts(val) to_string(val)
#define ti(val) stoi(val)
#define ft first
#define sc second
#define Pb push_back
#define pB pop_back
#define mp make_pair
#define mst(array,value) memset(array,value,sizeof(array))
#define gtr greater<int>()
#define all(ar) ar.begin(),ar.end()
using namespace std;
#define ull unsigned long long int
//#define int long long
bool no[100+5];
signed main() {
    fast
    int n; cin >> n;
    for(int i=0;i<n;i++) {
        int val; cin >> val;
        no[val] = true;
    }
    int m; cin >> m;
    int cnt = 0;
    while(m--) {
        int k; cin >> k;
        bool yes = true;
        for(int i=0;i<k;i++) {
            int val; cin >> val;
            if(no[val]) yes = false;
        }
        
        if(yes) cnt++;
    }
    cout << cnt << nl;
    return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... |