Submission #975480

# Submission time Handle Problem Language Result Execution time Memory
975480 2024-05-05T09:24:14 Z Error404 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define f first
#define s second



int main(){
    int n;
    cin >> n;
    int d[n];
    set<int>st;
    for(int i = 0; i < n; i++){
        cin >> d[i];
        st.insert(d[i]);
    }
    
    int m;
    cin >> m;
    int j,k;
    int ans = 0;
    bool check = false;
    for(int i = 0; i < m ;i++){
        cin >> j;
        check = false;
        while(j--){
            cin >> k;
            if(check)continue;
            if(st.count(k)){
                check = true;
            }
        }
        if(!check)ans++;
    }
    cout << ans << endl;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 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 344 KB Output is correct
2 Correct 1 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 1 ms 348 KB Output is correct