| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1334730 | yc11 | 드문 곤충 (IOI22_insects) | C++20 | 0 ms | 0 KiB |
#include "insects.h"
#include<bits/stdc++.h>
#define int long long
using namespace std;
int min_cardinality(int N) {
int ans = N;
vector<int> n1;
n1.assign(N,0);
for (int i = 0;i<N;i++){
int c = 1;
move_inside(i);
if (n1[i]!=0) continue;
for (int j = i+1;j<N;j++){
move_inside(j);
int c1 = press_button();
if (c1==c+1){
c++;
n1[j] = 1;
}
else move_outside(j);
}
ans = min(ans,c);
}
return ans;
}