This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |