이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
int n, m, ans = 0;
bool b[105] = {0};
int main(){
cin >> n;
for(int i = 1; i <= n; i++){
int a; cin >> a; b[a] = 1;
}
cin >> m;
while(m--){
int k; cin >> k;
bool yo = 1;
for(int i = 1; i <= k; i++){
int x; cin >> x;
if(b[x] == 1){
//cout << x << endl;
yo = 0;
}
}
if(yo) ans++;
}
cout << ans;
}
/*
3 7 2 4
5
3 1 2 3
3 4 5 6
3 7 8 9
3 1 3 6
3 2 4 7
*/
# | 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... |