# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
975968 |
2024-05-06T04:08:18 Z |
vjudge1 |
Pizza (COCI21_pizza) |
C++17 |
|
1 ms |
348 KB |
#include <bits/stdc++.h>
using namespace std;
int main(){
int n; cin >> n;
int a[n+1];
for(int i = 0; i < n; i++){
cin >> a[i];
}
int m; cin >> m;
int cnt = 0;
while(m--){
int k; cin >> k;
int b[k+1];
bool flag = true;
for(int i = 0; i < k; i++){
cin >> b[i];
}
for(int i = 0; i < n; i++){
for(int j = 0; j < k; j++){
if(a[i] == b[j]){
flag = false;
//goto mem;
break;
}
}
if(!flag) break;
}
//mem:
if(flag) cnt++;
}
cout << cnt << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
# |
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 |
1 ms |
344 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 |
0 ms |
348 KB |
Output is correct |