Submission #976804

# Submission time Handle Problem Language Result Execution time Memory
976804 2024-05-07T06:43:49 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 348 KB
#include<bits/stdc++.h>
using namespace std;
#define bismillah ios_base::sync_with_stdio(0), cin.tie(NULL), cout.tie(NULL);
#define int long long

signed main(){
	bismillah
	int n; cin >> n;
	int a[101];
	for(int i=0; i<n; i++){
		cin >> a[i];
	}
	int m;
	cin >> m;
	int ans=0;
	for(int i=0; i<m ;i++){
		int k;
		cin >> k;
		bool cek = true;
		for(int j=0; j<k; j++){
			int x;
			cin >> x;
			for(int p=0; p<n; p++){
				if(x==a[p]){
					cek = false;
					break;
				}
			}
		}
		if(cek){
			ans++;
		}
	}
	cout << ans;
}
# 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 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 344 KB Output is correct
2 Correct 1 ms 344 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