Submission #974588

# Submission time Handle Problem Language Result Execution time Memory
974588 2024-05-03T13:34:25 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 348 KB
#include<bits/stdc++.h>
using namespace std;
#define int long long

signed main(){
    int n;
    cin>>n;
    map<int,int>cek;
    while(n--){
        int v;
        cin>>v;
        cek[v]=1;
    }
    int k;
    int ans=0;
    cin>>k;
    while(k--){
        bool bisa=true;
        int bny;
        cin>>bny;
        while(bny--){
            int o;
            cin>>o;
            if(cek.count(o)){
                bisa=false;
            }
        }
        if(bisa==true){
            ans++;
        }
    }
    cout<<ans<<endl;
}
# 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 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 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