Submission #768715

# Submission time Handle Problem Language Result Execution time Memory
768715 2023-06-28T13:43:49 Z 1075508020060209tc Pizza (COCI21_pizza) C++14
50 / 50
1 ms 308 KB
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define X first
#define Y second
int n;int m;
int dislk[1000];

signed main(){
    int ans=0;
    cin>>n;
    for(int i=1;i<=n;i++){
        int v;
        cin>>v;
        dislk[v]=1;
    }
    cin>>m;
    for(int i=1;i<=m;i++){
        int ok=1;
        int v;
        cin>>v;
        for(int j=1;j<=v;j++){
            int t;
            cin>>t;
            if(dislk[t]){ok=0;}
        }
        ans+=ok;
    }
    cout<<ans<<endl;


}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 308 KB Output is correct
2 Correct 1 ms 308 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct