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;
int min_cardinality(int n) {
vector<bool> vis(n, false);
int ans = INT_MAX;
for(int i = 0; i < n; i++) {
if(vis[i]) continue;
int cnt = 0;
for(int j = i; j < n; j++) {
move_inside(j);
int now = press_button();
if(now <= cnt)
move_outside(j);
else {
cnt = now;
vis[j] = true;
}
}
ans = min(ans, cnt);
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |