This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// protocol_violation/solution-o-n-ans.cpp
#include "insects.h"
#include <bits/stdc++.h>
using namespace std;
int min_cardinality(int N) {
int colors = 0;
vector <int> insects(N);
iota(insects.begin(), insects.end(), 0);
for (int ans = 0; true; ans++) {
int cnt = 0;
vector <int> next;
for (int x : insects) {
move_inside(x);
if (press_button() == ans + 1) {
cnt++;
}
else {
move_outside(x);
next.push_back(x);
}
}
insects = next;
if (ans == 0) {
colors = cnt;
}
if (colors != 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... |