Submission #975860

# Submission time Handle Problem Language Result Execution time Memory
975860 2024-05-06T01:24:36 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 600 KB
#pragma GCC optimize ("Ofast")
#include <bits/stdc++.h>
#define ll long long
using namespace std;

#define FUE(i, a, N) for(int i = a; i <= N; i++)

int N, a, M, K, ans;
bool A[102], ada;

int main(){
    ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    cin >> N;
    FUE(i, 1, N){
        cin >> a;
        A[a] = true;
    }
    cin >> M;
    FUE(i, 1, M){
        ada = false;
        cin >> K;
        while(K--){
            cin >> a;
            if(A[a]){
                ada = true;
            }
        }
        if(!ada) ans++;
    }
    cout << ans;
    return 0;
}
# 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 0 ms 344 KB Output is correct
2 Correct 1 ms 348 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
# 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 600 KB Output is correct
2 Correct 0 ms 344 KB Output is correct