Submission #972841

# Submission time Handle Problem Language Result Execution time Memory
972841 2024-05-01T09:00:23 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 504 KB
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);
    int N; cin >> N;
    vector<bool>mark(105, 0);

    for(int i = 1; i <= N; i++){
        int x; cin >> x;
        mark[x] = true;
    }

    int M; cin >> M;
    int ans = 0;
    
    while(M--){
        int K; cin >> K;
        bool ok = true;
        for(int i = 1; i <= K; i++){
            int x; cin >> x;
            ok &= !mark[x];
        }

        ans += ok;
    }

    cout << ans << '\n';

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