Submission #975448

# Submission time Handle Problem Language Result Execution time Memory
975448 2024-05-05T08:08:40 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 496 KB
#include <bits/stdc++.h>
using namespace std;
#define ll long long

int main(){
	
	ll n, a[105], m, k, b;
	cin >> n;
	for(ll i = 0; i < n; i++){
		cin >> a[i];
	}
	
	cin >> m;
	int ans = 0;
	for(int i = 0; i < m; i++){
		cin >> k;
		bool cnt = true;
		for(ll j = 0; j < k; j++){
			cin >> b;
			for(ll k = 0; k < n; k++){
				if(b == a[k]){
					cnt = false;
					break;
				}
			}
		}
		
		if(cnt){
			ans++;
		}
	}
	
	cout << ans;
	
	
	return 0;
}
# 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 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 496 KB Output is correct
# 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