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 <bits/stdc++.h>
#include "insects.h"
using namespace std;
void move_inside(int);
void move_outside(int);
int press_button();
int min_cardinality(int x) {
map<int,int>mp;
int ans=1e9,lst=1;
for(int i=0;i<x;i++){
for(int j=0;j<x;j++){
if(mp[j])continue;
move_inside(j);
int z=press_button();
if(z==lst){
lst++;
mp[j]=1;
}else{
move_outside(j);
}
}
ans=min(ans,lst);
lst=1;
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |