# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
872971 | 2023-11-14T07:58:25 Z | aeg | Pizza (COCI21_pizza) | C++14 | 1 ms | 536 KB |
#include <bits/stdc++.h> using namespace std; #define I insert #define PB push_back int main() { int n; cin >> n; vector<int> a(n); for(int i=0; i<n; i++) { cin >> a[i]; } int m; cin>>m; set<set<int>> s; for(int i=0; i<m; i++) { set<int> tmp; int temp; cin>>temp; for(int j=0; j<temp; j++) { int a; cin >> a; tmp.I(a); } s.I(tmp); } for(int i=0; i<n; i++) { vector<set<int>> toer; for(auto x:s) { if(x.count(a[i])) toer.PB(x); } for(int i=0; i<toer.size(); i++) s.erase(s.find(toer[i])); } cout << s.size() << endl; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 1 ms | 536 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 1 ms | 344 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |