Submission #1082005

#TimeUsernameProblemLanguageResultExecution timeMemory
1082005glupanRarest Insects (IOI22_insects)C++17
10 / 100
274 ms344 KiB
#include "insects.h" #include <bits/stdc++.h> using namespace std; int min_cardinality(int N) { int types[N+1],found[N+1],cnt=1,ans=INT_MAX; memset(types,0,sizeof types); memset(found,0,sizeof found); for(int i=0; i<N; i++) { if(!found[i]) { move_inside(i); found[i] = cnt; types[cnt]++; cnt++; for(int j=i+1; j<N; j++) { if(!found[j]) move_inside(j); if(press_button() > 1) { found[j] = cnt-1; types[cnt-1]++; } move_outside(j); } move_outside(i); } } for(int i=0; i<=N; i++) if(types[i]) ans=min(ans,types[i]); return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...