#include <iostream>
#include <vector>
#include <set>
int exist(int el, std::vector<int>& set) {
int cnt = 0;
for (int i : set) {
if (el - i == 0) {
cnt++;
break;
}
}
return cnt;
}
int main() {
int ndislike;
std::cin >> ndislike;
std::vector<int> dislike;
for (int i = 0; i < ndislike; i++) {
int temp;
std::cin >> temp;
dislike.push_back(temp);
}
int nbingkisan;
std::cin >> nbingkisan;
std::vector<std::vector<int>> set_binks;
for (int i = 0; i < nbingkisan; i++) {
int ncemilan;
std::cin >> ncemilan;
std::vector<int> setcemilan;
for (int j = 0; j < ncemilan; j++) {
int cemil;
std::cin >> cemil;
setcemilan.push_back(cemil);
}
set_binks.push_back(setcemilan);
}
int ans = 0;
for (std::vector<int>& i : set_binks) {
int cnt = 0;
for (int j : i) {
if (exist(j, dislike) > 0) {
cnt++;
break;
}
}
if (cnt == 0) {
ans++;
}
}
std::cout << ans << std::endl;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |