Submission #975620

# Submission time Handle Problem Language Result Execution time Memory
975620 2024-05-05T15:00:17 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 v(a) vector<a>

int main(){
    ll n; cin >> n;
    map<ll, bool> ada;
    for(int i = 0; i < n; i++){
        ll a; cin >> a;
        ada[a] = true;
    }

    ll m; cin >> m;
    ll ans = 0;
    for(int i = 0; i < m; i++){
        ll k; cin >> k;
        bool ok = true;
        for(int j = 0; j < k; j++){
            ll a; cin >> a;
            if(ada[a]) ok = false;
        }

        if(ok) 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 1 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 344 KB Output is correct
2 Correct 1 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 344 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