Submission #1017176

# Submission time Handle Problem Language Result Execution time Memory
1017176 2024-07-09T05:38:45 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long

const int mod = 1e9+7;

signed main(){
    int n; cin >> n;
    set<int> a;
    for(int i = 0; i < n; i++){
        int u; cin >> u;
        a.insert(u);
    }
    
    int m; cin >> m;
    int cnt = 0;
    for(int i = 0; i < m; i++){
        int k; cin >> k;
        bool ada = false;
        for(int j = 0; j < k; j++){ // Use a different variable name
            int b; cin >> b;
            if(a.find(b) != a.end()){
                ada = true;
            
            }
        }
        
        if(!ada) cnt++;
    }
    
    cout << cnt;
}
# 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 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 344 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 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct