# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
776880 | SanguineChameleon | Rarest Insects (IOI22_insects) | C++17 | 49 ms | 428 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;
mt19937 gen(69420);
int D;
int solve(int K, vector<int> rem, int off) {
shuffle(rem.begin(), rem.end(), gen);
if (K == 0) {
return 0;
}
int mid = (K + 1) / 2;
vector<int> in, out;
int cnt = 0;
for (auto x: rem) {
if (cnt == mid * D) {
out.push_back(x);
continue;
}
move_inside(x);
if (press_button() > off + mid) {
move_outside(x);
out.push_back(x);
}
else {
cnt++;
in.push_back(x);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |