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 "insects.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int min_cardinality(int N) {
vector<int> type(N, -1);
for(int i = 0; i < N; ++i) {
if(type[i] == -1) {
type[i] = i;
}
else {
continue;
}
move_inside(i);
for(int j = i + 1; j < N; ++j) {
if(type[j] != -1) {
continue;
}
move_inside(j);
const int c = press_button();
if(c == 2) {
type[j] = type[i];
}
move_outside(j);
}
move_outside(i);
}
vector<int> cnt(N);
for(int x : type) {
assert(x != -1);
cnt[x]++;
}
int mn = N + 32;
for(int x : cnt) {
if(x > 0) {
mn = min(mn, x);
}
}
return mn;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |