# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
975888 | 2024-05-06T02:15:48 Z | vjudge1 | Pizza (COCI21_pizza) | C++17 | 0 ms | 0 KB |
#include <bits/stdc++.h> using namespace std; #define int long long #define Foxfur ios_base::sync_with_stdio(0);cin.tie(NULL); int32_t main() { Foxfur int n; cin >> n; vector <bool> v(101, 0); //memset(v,false,sizeof(v)); for(int i=0; i<n; i++) { int x; cin >> x; v[x] = true; } int m; cin >> m; int ans=0; for(int i=0; i<m; i++) { int k; cin >> k; int bingkisan[k]; bool flag = true; for(int j=0; j<k; j++) { cin >> bingkisan[j]; } for(int j=0; j<k; j++) { if(v[bingkisan[j]] == true) { //flag = false; //break; goto mem; } } //if(flag) //{ ans++; //} mem: } cout << ans << endl; }