Submission #808008

# Submission time Handle Problem Language Result Execution time Memory
808008 2023-08-05T04:20:38 Z tlnk07 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 312 KB
#include<bits/stdc++.h>
using namespace std;

long long n, m, cnt = 0, x, y;
bool check[100001], chk;

int main()
{
	cin >> n;
	for(int i = 1; i <= n; ++i)
	{
		cin >> x;
		check[x] = 1;
	}
	cin >> m;
	for(int i = 1; i <= m; ++i)
	{
		chk = 0;
		cin >> x;
		for(int j = 1; j <= x; ++j)
		{
			cin >> y;
			if(check[y])	chk = 1;
		}
		if(!chk)	++cnt;
	}
	cout << cnt;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 280 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 312 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 308 KB Output is correct
2 Correct 1 ms 256 KB Output is correct