Submission #974802

# Submission time Handle Problem Language Result Execution time Memory
974802 2024-05-03T20:09:06 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 756 KB
#include <bits/stdc++.h>

#define endl '\n'
#define ll long long

using namespace std;

bool hated[101];
int n, m, k;
int ans;

int main() {
    ios_base::sync_with_stdio(0); cin.tie(nullptr);
    cin >> n;
    ans = 0;
    for(int x, i = 0;i < n;i++) {
        cin >> x;
        hated[x] = true;
    }
    cin >> m;
    while(m--) {
        cin >> k;
        bool diBeli = true;
        for(int x, i = 0;i <k;i++) {
            cin >> x;
            if(hated[x]) diBeli = false;
        }
        if(diBeli) ans++;
    }
    cout << ans << endl;
    return 0;
}
# 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 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 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 756 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 344 KB Output is correct