This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "insects.h"
using namespace std;
int min_cardinality(int n) {
vector <bool> vis (n);
move_inside(0);
vis[0] = 1;
for (int i = 1; i <= n; i++){
int d = (i == 1);
for (int j = 0; j < n; j++){
if (vis[j]) continue;
if (press_button() == i + 1) {
move_outside(j);
d++;
}
else vis[j] = 1;
}
if (d != i) return i-1;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |