# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
381853 |
2021-03-26T05:23:46 Z |
Vimmer |
Pizza (COCI21_pizza) |
C++14 |
|
1 ms |
384 KB |
#include <bits/stdc++.h>
#define N 200500
#define PB push_back
#define endl '\n'
#define pri(x) cout << x << endl
#define _ << " " <<
#define sz(x) int(x.size())
#define F first
#define S second
#define all(x) x.begin(), x.end()
using namespace std;
typedef long long ll;
int main()
{
ios_base::sync_with_stdio(0); istream::sync_with_stdio(0); cin.tie(0); cout.tie(0);
// freopen("1.in", "r", stdin);
int n;
cin >> n;
bool mk[200];
memset(mk, 0, sizeof mk);
for (int i = 1; i <= n; i++)
{
int x;
cin >> x;
mk[x] = 1;
}
int ans = 0;
int q;
cin >> q;
for (; q > 0; q--)
{
int k;
cin >> k;
bool gd = 1;
for (int i = 0; i < k; i++)
{
int x;
cin >> x;
if (mk[x])
gd = 0;
}
if (gd)
ans++;
}
pri(ans);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
364 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
364 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
384 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
364 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
364 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |