Submission #922963

# Submission time Handle Problem Language Result Execution time Memory
922963 2024-02-06T11:13:57 Z Ludissey Rarest Insects (IOI22_insects) C++17
10 / 100
221 ms 412 KB
#include "insects.h"
#include <bits/stdc++.h>

using namespace std;

struct insect {
  int i,sz;
};

int min_cardinality(int N) {
  vector<int> in(0);
  vector<int> out;
  for (int i = 0; i < N; i++) out.push_back(i);
  int r;
  int lastIn=in.size();
  for (r = 1; r <= N && out.size()>0; r++)
  {
    for (int i = 0; i < (int)out.size(); i++){
      move_inside(out[i]);
      if(press_button()>r){
        move_outside(out[i]);
      }else{
        in.push_back(out[i]);
        out.erase(out.begin()+i);
        i--;
      }
    }
    if((int)in.size()<lastIn*r) return (r-1);
    if(r==1) lastIn=in.size();
  }
  return (r-1);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 1 ms 412 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 100 ms 344 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 6 ms 344 KB Output is correct
9 Correct 6 ms 344 KB Output is correct
10 Correct 2 ms 344 KB Output is correct
11 Correct 2 ms 344 KB Output is correct
12 Correct 3 ms 344 KB Output is correct
13 Correct 2 ms 344 KB Output is correct
14 Correct 20 ms 344 KB Output is correct
15 Correct 13 ms 344 KB Output is correct
16 Correct 11 ms 344 KB Output is correct
17 Correct 8 ms 344 KB Output is correct
18 Correct 5 ms 344 KB Output is correct
19 Correct 4 ms 344 KB Output is correct
20 Correct 2 ms 344 KB Output is correct
21 Correct 2 ms 344 KB Output is correct
22 Correct 2 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 1 ms 412 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 100 ms 344 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 6 ms 344 KB Output is correct
9 Correct 6 ms 344 KB Output is correct
10 Correct 2 ms 344 KB Output is correct
11 Correct 2 ms 344 KB Output is correct
12 Correct 3 ms 344 KB Output is correct
13 Correct 2 ms 344 KB Output is correct
14 Correct 20 ms 344 KB Output is correct
15 Correct 13 ms 344 KB Output is correct
16 Correct 11 ms 344 KB Output is correct
17 Correct 8 ms 344 KB Output is correct
18 Correct 5 ms 344 KB Output is correct
19 Correct 4 ms 344 KB Output is correct
20 Correct 2 ms 344 KB Output is correct
21 Correct 2 ms 344 KB Output is correct
22 Correct 2 ms 340 KB Output is correct
23 Incorrect 186 ms 344 KB Too many queries.
24 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Incorrect 221 ms 344 KB Too many queries.
8 Halted 0 ms 0 KB -