# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
975544 |
2024-05-05T12:56:00 Z |
vjudge1 |
Pizza (COCI21_pizza) |
C++17 |
|
1 ms |
348 KB |
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
int n; cin >> n;
int a[n];
for(int i = 0; i < n; i++)cin >> a[i];
int m; cin >> m;
int k[m];
int b[m][107];
bool val[107];
int ans = 0;
memset(val, 0, sizeof(val));
for(int i = 0; i < m; i++){
cin >> k[i];
for(int j = 0; j < k[i]; j++){
cin >> b[i][j];
}
}
for(int i = 0; i < m; i++){
if(!val[m]){
for(int j = 0; j < k[i]; j++){
for(int l = 0; l < n; l++){
if(b[i][j] == a[l]){
val[i] = true;
break;
}
}
}
}
}
for(int i = 0; i < m; i++){
if(!val[i])ans++;
}
cout << ans << 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 |
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 |
1 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 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 |