# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
381868 |
2021-03-26T06:07:17 Z |
Araragi |
Pizza (COCI21_pizza) |
C++17 |
|
1 ms |
364 KB |
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("00")
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int, int> pii;
ll time() {return chrono::system_clock().now().time_since_epoch().count();}
mt19937 rnd(time());
const int inf = 1e9;
const ll inf64 = 1e18;
#define ft first
#define fin(x) ifstream cin("x.in");
#define fout(x) ofstream cout("x.out");
#define sd second
#define pb push_back
#define sz(x) (int)x.size()
void solve()
{
int n;
cin >> n;
set<int> t;
vector<int> tabu(n);
for (int i = 0; i < n; i++)
{
cin >> tabu[i];
t.insert(tabu[i]);
}
int k;
cin >> k;
int ans = 0;
for (int i = 0; i < k; i++)
{
int z;
cin >> z;
bool bad = false;
for (int j = 0; j < z; j++)
{
int x;
cin >> x;
if (t.find(x) != t.end())
bad = true;
}
if (!bad)
ans++;
}
cout << ans;
}
int main()
{
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifdef _LOCAL_
system("color 2");
#endif // _LOCAL_
int t = 1;
while (t--)
solve();
}
# |
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 |
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 |
364 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |