| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1228835 | ericl23302 | 드문 곤충 (IOI22_insects) | C++20 | 98 ms | 408 KiB |
#include "insects.h"
#include <bits/stdc++.h>
using namespace std;
int min_cardinality(int N) {
vector<bool> erased(N, false);
int least = 1e9, cur = 1;
for (int i = 0; i < N; ++i) {
if (erased[i]) continue;
move_inside(i);
cur = 1;
for (int j = i + 1; j < N; ++j) {
if (erased[j]) continue;
move_inside(j);
int ans = press_button();
if (ans == 2) {
++cur;
erased[j] = true;
}
move_outside(j);
}
move_outside(i);
if (cur < least) least = cur;
if (least == 1) return 1;
}
return least;
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
