# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
975986 |
2024-05-06T04:18:38 Z |
vjudge1 |
Pizza (COCI21_pizza) |
C++17 |
|
1 ms |
348 KB |
#include "bits/stdc++.h"
//#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <cmath>
#include <math.h>
#include <algorithm>
#include <set>
#define all(i) i.begin(), i.end()
#define rall(i) i.rbegin(), i.rend()
#define int long long
#define fi first
#define se second
const int mod = 1e9+7;
const int Mod = 998244353;
using namespace std;
int f(int a, int b){
if (b==0) return 1;
int res=f(a,b/2);
res=(res*res)%mod;
if(b&1) res=(res*a)%mod;
return res;
}
int nCr[21][21];
void pre_compute(){
nCr[0][0]=1ll;
for(int i=1;i<21;i++){
nCr[i][0]=1;
for(int j=1;j<=i;j++){
nCr[i][j]=(nCr[i-1][j]+nCr[i-1][j-1])%mod;
}
}
}
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n, m;
cin>>n;
set<int> a; //makanan yang ga disukai
for(int i=0; i<n; i++) {
int x;
cin>>x;
a.insert(x);
}
// for(auto it : a){
// cout<<it<<" ";
// }
cin>>m;
int k;
int ans=0;
for(int i=0; i<m; i++){
cin>>k;
bool suka=true;
for(int j=0; j<k; j++){
int s;
cin>>s;
if(a.count(s)) suka=false;
}
if(suka) ans++;
}
cout<<ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |