Submission #975554

# Submission time Handle Problem Language Result Execution time Memory
975554 2024-05-05T13:20:40 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 348 KB
#include<bits/stdc++.h>
using namespace std;

using ll = long long;

signed main() {
	int n;
	cin >> n;

	set<int> a;

	for (int i = 0; i< n; i++) {
		int x;
		cin >> x;
		a.insert(x);
	}

	int ans = 0;

	int m;
	cin >> m;

	for (int i = 0; i<m; i++) {
		int k;
		cin >> k;
		bool ok = 1;
		for (int j = 0; j< k; j++) {
			int x;
			cin >> x;
			if (a.count(x)) ok = 0;
		}
		ans += ok;
	}

	cout << ans << '\n';
}
# 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 1 ms 348 KB Output is correct
2 Correct 0 ms 348 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 0 ms 348 KB Output is correct
2 Correct 1 ms 348 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