#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define fi first
#define sec second
#define pii pair<ll,ll>
const ll N = 1e5 + 5;
const ll MOD = 1e9 + 7;
signed main(){
ios_base::sync_with_stdio(false); cin.tie(nullptr);
ll tc = 1;
// cin >> tc;
while(tc--){
ll n; cin >> n;
vector<ll>mark(105);
for(int i=1;i<=n;i++){
ll x; cin >> x;
mark[x] = 1;
}
ll m; cin >> m;
ll ans = 0;
for(int i=1;i<=m;i++){
ll k; cin >> k;
bool bs = 1;
for(int j=1;j<=k;j++){
ll x; cin >> x;
if(mark[x]) bs = 0;
}
ans += bs;
}
cout << ans << endl;
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 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 |
0 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 |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |