Submission #380442

# Submission time Handle Problem Language Result Execution time Memory
380442 2021-03-21T19:51:53 Z penguinhacker Pizza (COCI21_pizza) C++14
50 / 50
1 ms 384 KB
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define ar array

int n, m, ans;
bool bad[100];

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	cin >> n;
	for (int i = 0, x; i < n; ++i)
		cin >> x, --x, bad[x] = 1;
	cin >> m;
	for (int i = 0, k; i < m; ++i) {
		cin >> k;
		bool ok = 1;
		for (int j = 0, x; j < k; ++j)
			cin >> x, --x, ok &= !bad[x];
		ans += ok;
	}
	cout << ans;
	return 0;
}
# 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 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