제출 #929041

#제출 시각아이디문제언어결과실행 시간메모리
929041a_l_i_r_e_z_aPizza (COCI21_pizza)C++17
50 / 50
1 ms348 KiB
// In the name of God // Hope is last to die #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<ll, ll> pll; #define pb push_back // #define int long long #define S second #define F first #define mp make_pair #define smax(x, y) (x) = max((x), (y)) #define smin(x, y) (x) = min((x), (y)) #define all(x) (x).begin(), (x).end() #define len(x) ((int)(x).size()) const int maxn = 1e3 + 5; const int inf = 1e9 + 7; int n, m; bool mark[maxn]; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n; for(int i = 0; i < n; i++){ int a; cin >> a; mark[a] = 1; } cin >> m; int ans = 0; for(int i = 0; i < m; i++){ int k; cin >> k; bool flag = 0; for(int j = 0; j < k; j++){ int a; cin >> a; if(mark[a]) flag = 1; } if(!flag) ans++; } cout << ans << '\n'; 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...