# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1060093 | DorostWef | Rarest Insects (IOI22_insects) | C++17 | 42 ms | 940 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) {
vector <int> a;
int n = N;
int k = 0;
vector <int> d;
for (int i = 0; i < n; i++) {
move_inside (i);
if (press_button() >= 2) {
move_outside (i);
a.push_back(i);
} else {
d.push_back(i);
k++;
}
}
for (int i : d)
move_outside (i);
int ans = 1;
vector <int> b, c;
while ((int)a.size() >= k) {
for (int i : c)
move_outside (i);
n = (int)a.size();
// cout << n << endl;
int m = (n + 2 * k - 1) / (2 * k);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |