Submission #715025

# Submission time Handle Problem Language Result Execution time Memory
715025 2023-03-25T20:43:39 Z TheConverseEngineer Pizza (COCI21_pizza) C++17
50 / 50
1 ms 324 KB
#include <bits/stdc++.h>
using namespace std;

#define FOR(i, a, b) for(int i = a; i < (b); ++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define sqr(x) ((ll)(x))*(x)
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;



int N, M;
set<int> dis;

int main() {
	cin.tie(0)->sync_with_stdio(0);

	cin >> N;
	FOR(i, 0, N) {
		int a; cin >> a; dis.insert(a);
	}
	cin >> M;
	int good = 0;
	FOR(i, 0, M) {
		bool failed = false;
		int k; cin >> k; FOR(_k, 0, k){
			int f; cin >> f; if (dis.count(f)) failed = true;
		}
		if (!failed) good++;
	}

	cout << good;
	
	
} 
# 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 1 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 324 KB Output is correct
2 Correct 1 ms 320 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 320 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 316 KB Output is correct
2 Correct 1 ms 316 KB Output is correct