제출 #381867

#제출 시각아이디문제언어결과실행 시간메모리
381867SlavitaPizza (COCI21_pizza)C++14
50 / 50
1 ms492 KiB
#include <bits/stdc++.h> #define ve vector<int> #define pb push_back #define mp make_pair #define fi first #define se second #define pi pair<int,int> #define all(v) v.begin(),v.end() #define si(v) (int)v.size() #define en '\n' using namespace std; typedef long long ll; typedef unsigned long long ull; const int N = 1e2 + 228; const int big = 1e9; int n, b[N], c[N][N], m; int main(){ iostream::sync_with_stdio(false); cin.tie(0); ios_base::sync_with_stdio(false); cout.tie(0); //freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout); cin >> n; for (int i = 1; i <= n; i++) {int x; cin >> x; b[x] = 1;} cin >> m; int ans = 0; for (int i = 1; i <= m; i++){ int k; cin >> k; bool ok = 1; for (int j = 1; j <= k; j++){ int x; cin >> x; if (b[x] == 1) ok = 0; } if (ok) ans++; } 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...