Submission #380442

#TimeUsernameProblemLanguageResultExecution timeMemory
380442penguinhackerPizza (COCI21_pizza)C++14
50 / 50
1 ms384 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define ar array int n, m, ans; bool bad[100]; int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> n; for (int i = 0, x; i < n; ++i) cin >> x, --x, bad[x] = 1; cin >> m; for (int i = 0, k; i < m; ++i) { cin >> k; bool ok = 1; for (int j = 0, x; j < k; ++j) cin >> x, --x, ok &= !bad[x]; ans += ok; } cout << ans; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...