답안 #1034313

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1034313 2024-07-25T12:13:18 Z Mr_Husanboy 드문 곤충 (IOI22_insects) C++17
10 / 100
266 ms 404 KB
#include "insects.h"
#include <bits/stdc++.h>

using namespace std;

#define ff first
#define ss second
#define all(a) (a).begin(), (a).end()
#define ll long long
const int mod = 1000002022;

vector<int> state, p;
int n, m; 
vector<vector<int>> g;
template<typename T>
int len(T &a){return a.size();}


int min_cardinality(int n) {
  int ans = n;
  vector<int> done(n);
  for(int i = 0; i < n; i ++){
    if(done[i]) continue;
    done[i] = 1;
    move_inside(i);
    int cnt = 1;
    for(int j = i + 1; j < n; j ++){
      if(done[j]) continue;
      move_inside(j);
      if(press_button() > 1){
        cnt ++;
        done[j] = 1;
      }
      move_outside(j);
    }
    move_outside(i);
    ans = min(ans, cnt);
  }

  return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 103 ms 344 KB Output is correct
8 Correct 5 ms 344 KB Output is correct
9 Correct 8 ms 344 KB Output is correct
10 Correct 3 ms 344 KB Output is correct
11 Correct 46 ms 344 KB Output is correct
12 Correct 3 ms 344 KB Output is correct
13 Correct 6 ms 344 KB Output is correct
14 Correct 4 ms 344 KB Output is correct
15 Correct 4 ms 344 KB Output is correct
16 Correct 5 ms 344 KB Output is correct
17 Correct 6 ms 344 KB Output is correct
18 Correct 6 ms 344 KB Output is correct
19 Correct 9 ms 344 KB Output is correct
20 Correct 22 ms 344 KB Output is correct
21 Correct 38 ms 344 KB Output is correct
22 Correct 70 ms 344 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 0 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 103 ms 344 KB Output is correct
8 Correct 5 ms 344 KB Output is correct
9 Correct 8 ms 344 KB Output is correct
10 Correct 3 ms 344 KB Output is correct
11 Correct 46 ms 344 KB Output is correct
12 Correct 3 ms 344 KB Output is correct
13 Correct 6 ms 344 KB Output is correct
14 Correct 4 ms 344 KB Output is correct
15 Correct 4 ms 344 KB Output is correct
16 Correct 5 ms 344 KB Output is correct
17 Correct 6 ms 344 KB Output is correct
18 Correct 6 ms 344 KB Output is correct
19 Correct 9 ms 344 KB Output is correct
20 Correct 22 ms 344 KB Output is correct
21 Correct 38 ms 344 KB Output is correct
22 Correct 70 ms 344 KB Output is correct
23 Correct 7 ms 344 KB Output is correct
24 Incorrect 264 ms 344 KB Too many queries.
25 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 404 KB Output is correct
4 Correct 1 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 Correct 13 ms 344 KB Output is correct
8 Incorrect 266 ms 344 KB Too many queries.
9 Halted 0 ms 0 KB -