Submission #976388

# Submission time Handle Problem Language Result Execution time Memory
976388 2024-05-06T13:53:56 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;

int main() {
	
	set<int> a;
	int n;
	cin >> n;
	for (int i=0;i<n;i++) {
		int ye; cin >> ye;
		a.insert(ye);
	}
	
	int m; cin >> m;
	int k[m];
	int b[107][107];
	
	int ans = 0;
	for (int i=0;i<m;i++) {
		int sem = 0;
		cin >> k[i];
		for (int j=0;j<k[i];j++) {
			cin >> b[i][j];
		}
		
		ans++;
		
		for (int j=0;j<k[i];j++) {
			if (a.count(b[i][j])) {
				ans--;
				break;
			}
		}
	}	
	
	cout << ans << endl;
	
	
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:20:7: warning: unused variable 'sem' [-Wunused-variable]
   20 |   int sem = 0;
      |       ^~~
# 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 0 ms 348 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
# 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 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct