# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
628279 | I_love_Hoang_Yen | Rarest Insects (IOI22_insects) | C++17 | 61 ms | 348 KiB |
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) {
int colors = 0;
vector <int> insects;
vector <int> order(N);
iota(order.begin(),order.end(),0);
mt19937 mt(715082022);
shuffle(order.begin(),order.end(),mt);
for (int x : order) {
move_inside(x);
if (press_button() == 1) {
colors++;
}
else {
move_outside(x);
insects.push_back(x);
}
}
int ans = 1;
int rest = N - colors;
vector <int> in, out;
while (rest >= colors) {
int mid = ans + (rest + colors + 1) / (2 * colors);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |