Submission #976739

# Submission time Handle Problem Language Result Execution time Memory
976739 2024-05-07T04:59:54 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 348 KB
#include<bits/stdc++.h>
#define ll long long
using namespace std;

//masukan camilan yang tidak disukai ke set
//msukan bingkisan, cek apakah ada set, kalau tidak tambah ans



int main(){
    ll n; cin>>n;
    bool cemilan[105];
    memset (cemilan, true, 105);
    for(ll i=1; i<=n; i++){
        ll a; cin>>a;
        cemilan[a]=false;
    }
    ll m; cin>>m;
    ll ans =0;
    for(ll i=1; i<=m; i++){
        bool cek=true;
        ll k; cin>>k;
        for(ll j=1; j<=k; j++){
            ll b; cin>>b;
            if(cemilan[b]==false){
                cek=false;
            }
        }
        if(cek==true){
            ans++;
        }
    }
    cout<<ans<<endl;
}


# 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 1 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 1 ms 348 KB Output is correct
2 Correct 0 ms 344 KB Output is correct