Submission #658597

#TimeUsernameProblemLanguageResultExecution timeMemory
658597pere_gilRarest Insects (IOI22_insects)C++17
0 / 100
1 ms208 KiB
#include "insects.h" #include "bits/stdc++.h" using namespace std; void pri(vector<int> v){ for(int x: v) printf("%d ",x); printf("\n"); } void get(vector<int> &a, vector<int> &b){ for(int u: a){ move_inside(u); if(press_button()==2){ move_outside(u); b.push_back(u); } } } int min_cardinality(int n) { vector<int> a(n),b; iota(a.begin(),a.end(),0); int res=1; for(;res<=n;res++){ get(a,b); if(a.size()>b.size()) break; a=b; b.clear(); } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...