# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
975676 |
2024-05-05T17:20:49 Z |
vjudge1 |
Pizza (COCI21_pizza) |
C++17 |
|
1 ms |
348 KB |
#include<bits/stdc++.h>
#define ll long long
#define fi first
#define se second
using namespace std;
const ll MOD = 1e9+7;
const ll INF = 1e18;
void solve(){
ll n; cin >> n;
ll non[n+5];
for(ll i=0; i<n; i++){
cin >> non[i];
}
ll ans = 0;
ll m; cin >> m;
while(m--){
ll k; cin >> k;
ll arr[k+5];
for(ll i=0; i<k; i++){
cin >> arr[i];
}
bool ada = 1;
for(ll i=0; i<n; i++){
if(ada){
for(ll j=0; j<k; j++){
if(non[i] == arr[j]){
ada = 0;
break;
}
}
}else break;
}
if(ada) ans++;
}
cout << ans;
}
int main(){
ll t=1; //cin >> t;
while(t--){
solve();
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 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 |
1 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 |
344 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 |