Submission #976858

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

int main(){
    int n;
    cin >> n;

    set<int> st;
    for(int i = 0; i < n; i++){
        int x;
        cin >> x;

        st.insert(x);
    }

    int m;
    cin >> m;
    int ans = 0;
    for(int i = 0; i < m; i++){
        int k;
        cin >> k;

        bool flag = 1;
        for(int i = 0; i < k; i++){
            int b;
            cin >> b;

            if(st.count(b)){
                flag = 0;
            }
        }

        ans += (flag == 1);
    }

    cout << ans << endl;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 344 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 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