Submission #628150

# Submission time Handle Problem Language Result Execution time Memory
628150 2022-08-13T06:31:47 Z sword060 Rarest Insects (IOI22_insects) C++17
0 / 100
1 ms 208 KB
#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
1 Incorrect 0 ms 208 KB Wrong answer.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB Wrong answer.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 208 KB Output is correct
2 Incorrect 1 ms 208 KB Wrong answer.
3 Halted 0 ms 0 KB -