답안 #975554

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
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';
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct