Submission #975430

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

int main(){
    int n;
    cin >> n;
    map<int,bool> mp;
    for(int i = 0; i<n; i++){
        int x;
        cin >> x;
        mp[x] = 1;
    }
    int m;
    cin >> m;
    int ans = 0;
    for(int i = 0; i<m; i++){
        int k;
        cin >> k;
        int ril = 1;
        for(int j = 0; j<k; j++){
            int x;
            cin >> x;
            if(mp[x] == 1){
                ril = 0;
            }
        }
        if(ril) ans++;
    }
    cout << ans << endl;
}
# 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 344 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 1 ms 348 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 348 KB Output is correct