# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
658404 | coding_snorlax | 드문 곤충 (IOI22_insects) | C++17 | 330 ms | 256 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<bits/stdc++.h>
#include "insects.h"
using namespace std;
int All_type[200]={0};
int Box[200]={0};
int Check[200]={0};
/*
void move_inside(int i){
Box[i]=1;
}
void move_outside(int i){
Box[i]=0;
}
int press_button(){
for(int i=0;i<200;i++){
if(Box[i]) cout<<i<<" ";
}
cout<<endl;
int answer;
cin>>answer;
return answer;
}
*/
int min_cardinality(int N){
int level_1;
for(int i=1;i<=N;i++){
for(int j=0;j<N;j++){
int tmp;
if(!All_type[j]){
move_inside(j);
tmp=press_button();
if(tmp>i){
move_outside(j);
}
else{
Check[j]=1;
}
}
}
int Count=0;
for(int j=0;j<N;j++){
if(Check[j]==1) {
move_outside(j);
Check[j]=0;
Count++;
}
}
if(i==1) level_1=Count;
else if(Count<level_1*i) return i-1;
}
return N;
}
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... |