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;
bool inside[1000];
int min_cardinality(int n) {
int groups = 0;
for (int l = 1; l < 1001; l++){
int g = 0;
for (int i = 0; i < n; i++){
if (inside[i]) continue;
move_inside(i);
if (press_button() > l){
move_outside(i);
} else {
g++;
inside[i] = 1;
}
}
if (groups == 0){
groups = g;
} else if (g < groups){
return l-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... |