답안 #922963

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
922963 2024-02-06T11:13:57 Z Ludissey 드문 곤충 (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);
}
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -