Submission #418809

# Submission time Handle Problem Language Result Execution time Memory
418809 2021-06-05T22:44:35 Z Chaska Pizza (COCI21_pizza) C++11
50 / 50
1 ms 204 KB
#include <bits/stdc++.h>
#define fo(a,b,c) for (int a=b;a<=c;a++)
using namespace std;
int n,q,b,a[105],c;
bool vs[105];
int main()
{
	cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
	cin >> n;
	fo(i,0,n-1) cin >> a[i];
	fo(i,0,n-1) vs[a[i]] = true;
	cin >> q;
	int c=0;
	fo(i,0,q-1) {
		cin >> b;
		bool y = true;
		fo(j,0,b-1) {
			int x;
			cin >>x;
			if (vs[x]) y = false;
		}
		if(y) c++;  
	}
	cout << c;
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct