이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#define ll long long
using namespace std;
//masukan camilan yang tidak disukai ke set
//msukan bingkisan, cek apakah ada set, kalau tidak tambah ans
int main(){
ll n; cin>>n;
bool cemilan[105];
memset (cemilan, true, 105);
for(ll i=1; i<=n; i++){
ll a; cin>>a;
cemilan[a]=false;
}
ll m; cin>>m;
ll ans =0;
for(ll i=1; i<=m; i++){
bool cek=true;
ll k; cin>>k;
for(ll j=1; j<=k; j++){
ll b; cin>>b;
if(cemilan[b]==false){
cek=false;
}
}
if(cek==true){
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... |