# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
684585 | 2023-01-21T21:29:19 Z | koolaider | Pizza (COCI21_pizza) | C++17 | 1 ms | 304 KB |
#include <bits/stdc++.h> #include <cstdlib> using namespace std; void setIO(string s) { freopen((s + ".in").c_str(), "r", stdin); freopen((s + ".out").c_str(), "w", stdout); } #define watch(x) cerr << "\n" << (#x) << " is " << (x) << endl #define pb push_back #define ll long long const long long MN = 2e9; void __print(int x) {cerr << x;} void __print(long x) {cerr << x;} void __print(long long x) {cerr << x;} void __print(unsigned x) {cerr << x;} void __print(unsigned long x) {cerr << x;} void __print(unsigned long long x) {cerr << x;} void __print(float x) {cerr << x;} void __print(double x) {cerr << x;} void __print(long double x) {cerr << x;} void __print(char x) {cerr << '\'' << x << '\'';} void __print(const char *x) {cerr << '\"' << x << '\"';} void __print(const string &x) {cerr << '\"' << x << '\"';} void __print(bool x) {cerr << (x ? "true" : "false");} template<typename T, typename V> void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';} template<typename T> void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";} void _print() {cerr << "]\n";} template <typename T, typename... V> void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);} #ifndef ONLINE_JUDGE #define debug(x...) cerr << "[" << #x << "] = ["; _print(x) #else #define debug(x...) #endif //func(Zeal){Try to make things logical for you, be less pressured} // Draw cases // Try to find the pattern // chill confidence /* #pragma GCC target ("avx,avx2") #pragma GCC optimize ("Ofast") */ //const long long ML = 1e18; //const int MN = 1e9; const int MM = 1e9+7; int main(int argc, char **argv){ //ios_base::sync_with_stdio(false); cin.tie(NULL), cout.tie(NULL); //setIO("feast"); int n; cin >> n; vector<int> disliked(n); for(int i = 0; i<n; i++){ cin >> disliked[i]; } int m; cin >> m; int k; int ans = 0; for(int i = 0; i<m; i++){ cin >> k; int topping; bool willHe = true; for(int j = 0; j<k; j++){ cin >> topping; if(find(disliked.begin(), disliked.end(), topping)!=disliked.end()){ willHe=false; } } if(willHe){ ans++; } } cout << ans; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 304 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 304 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 304 KB | Output is correct |