#include <bits/stdc++.h>
#include "insects.h"
using namespace std;
using ll = long long;
bool ch[2020];
int min_cardinality(int n) {
int mn = n;
for (int i = 0;i < n;i++) {
if (ch[i]) continue;
ch[i] = 1;
int cnt = 1;
move_inside(i);
for (int j = i + 1;j < n;j++) {
move_inside(j);
if (press_button() == 2) {
cnt++;
ch[j] = 1;
}
move_outside(j);
}
mn = min(mn, cnt);
}
return mn;
}
# |
결과 |
실행 시간 |
메모리 |
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 |
Incorrect |
0 ms |
344 KB |
Wrong answer. |
5 |
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 |
344 KB |
Output is correct |
4 |
Incorrect |
0 ms |
344 KB |
Wrong answer. |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Wrong answer. |
2 |
Halted |
0 ms |
0 KB |
- |