Submission #1171678

#TimeUsernameProblemLanguageResultExecution timeMemory
1171678tatasPizza (COCI21_pizza)C++20
20 / 50
1096 ms528 KiB
/* Bismillah Medal Nama: Muhammad Tatas Maulana Sekolah: MAN Insan Cendekia Lombok Timur Member of Zevthasses Elmaerifa */ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<ll> vll; #define pb push_back #define all(x) (x).begin(), (x).end() #define fi first #define se second #define endl '\n' const ll MOD = 1e9 + 7; const ll INF = 1e18; void solve() { int n; cin >> n; int a[101]; memset(a, false, sizeof a); for (int i = 0; i < n; i++) { int x; cin >> x; a[x] = true; } int m; cin >> m; int ans = 0; while (m--) { int k; cin >> k; bool ok = true; while (k--) { int x; cin >> x; if (a[x]) { ok = false; break; } } if (ok) ans++; } cout << ans; } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t = 1; // cin >> t; // Uncomment if multiple test cases while (t--) { solve(); } 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...