# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
672035 | Waratpp123 | Rarest Insects (IOI22_insects) | C++17 | 0 ms | 208 KiB |
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;
int cnt[2050],ch[2050],mi=2050;
int min_cardinality(int N) {
int i,j,now,s=-1,ans=1;
while(1){
now=0;
for(i=0;i<N;i++){
if(ch[i]==1) continue;
move_inside(i);
ch[i]=1;
if(press_button()==ans) {
now++;
continue;
}
move_outside(i);
ch[i]=0;
}
if(s==-1){
s=now;
ans++;
}else{
if(s==now) ans++,s=now;
else return ans;
}
}
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |