# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
975581 |
2024-05-05T13:53:00 Z |
vjudge1 |
Pizza (COCI21_pizza) |
C++17 |
|
1 ms |
348 KB |
#include <bits/stdc++.h>
using namespace std;
#define ios ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
// N A1 A2 … AN
// M
// K1 B1,1 B1,2 … B1,K1
// K2 B2,1 B2,2 … B2,K2
// ⋮
// KM BM,1 BM,2 … BM,KM
int main()
{
ios
ll n; cin >> n;
ll a[n+1];
for (int i=0; i<n; i++){
cin >> a[i];
}
ll m; cin >> m;
ll cnt=0;
while (m--){
ll k;cin >> k;
ll b[k+1];
bool bul=true;
for (int i=0; i<k; i++){
cin >> b[i];
for (int j=0; j<n; j++){
if (b[i]==a[j]){
bul=false;
}
}
}
if (bul)cnt++;
}
cout << cnt << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 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 |
344 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 |
0 ms |
348 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 |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |