Submission #474616

# Submission time Handle Problem Language Result Execution time Memory
474616 2021-09-19T07:59:37 Z mychecksedad Pizza (COCI21_pizza) C++17
50 / 50
1 ms 312 KB
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define pb push_back
#define all(x) x.begin(), x.end()
const int N = 3e5+100, M = 1e5+10, F = 2147483646, K = 20;

int n, k, ans = 0, x;
map<int, bool> m;
int main(){
    cin.tie(0); ios::sync_with_stdio(0);
    cin >> n;
    for(int i = 0; i < n; i++){
        cin >> k;
        m[k] = 1;
    } 
    cin >> x;
    for(;x;--x){
        bool ok = 1;
        cin >> k;
        for(;k;--k){
            cin >> n;
            if(m[n]) ok = 0;
        }
        if(ok) ++ans;
    }
    cout << ans;





    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 312 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct