Submission #975434

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

#define ll long long
#define pll pair<ll, ll>
#define pii pair<int, int>
#define AC ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define fs first
#define sc second
#define pb push_back


int n, a[107], M, K, p, flag, ans;
int main() {   
    AC
    cin >> n;
    for(int i=0; i<n; i++){
        cin >> p;
        a[p]++;
    }
    cin >> M;
    while (M--){
        flag=1;
        cin >> K;
        for(int i=0; i<K; i++){
            cin >> p;
            if(a[p])flag=0;
        }
        if(flag)ans++;
    }
    cout << ans;
}
# 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 344 KB Output is correct
2 Correct 1 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 344 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