This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define f first
#define s second
int main(){
int n;
cin >> n;
int d[n];
set<int>st;
for(int i = 0; i < n; i++){
cin >> d[i];
st.insert(d[i]);
}
int m;
cin >> m;
int j,k;
int ans = 0;
bool check = false;
for(int i = 0; i < m ;i++){
cin >> j;
check = false;
while(j--){
cin >> k;
if(check)continue;
if(st.count(k)){
check = true;
}
}
if(!check)ans++;
}
cout << ans << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |