# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
975090 |
2024-05-04T12:19:12 Z |
vjudge1 |
Pizza (COCI21_pizza) |
C++17 |
|
1 ms |
392 KB |
#include <bits/stdc++.h>
using namespace std;
int main(){
int n; cin >> n;
int a[n+1];
int ans = 0;
for(int i = 1; i <= n; i++){
cin >> a[i];
}
int m; cin >> m;
while(m--){
int k; cin >> k;
//int b[k+1];
map<int, int> b;
//memset(b, -1, sizeof b);
b.clear();
bool ada = false;
for(int i = 1; i <= k; i++){
int x; cin >> x;
b[x]++;
}
for(int i = 1; i <= n; i++){
//for(int j = 1; j <= k; j++){
// if(a[i] == b[j])
//}
//cout << b.count(a[i]) << " ";
if(b.count(a[i]) != 0){
ada = true;
break;
}
}
//cout << endl << ada << endl;
//cout << ans << endl;
if(!ada) ans++;
}
cout << ans << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 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 |
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 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
392 KB |
Output is correct |