# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
886555 | thinknoexit | Rarest Insects (IOI22_insects) | C++17 | 105 ms | 1716 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 <bits/stdc++.h>
#include "insects.h"
using namespace std;
using ll = long long;
int n;
int sz = 0;
set<int> rem;
void putin(int x) {
move_inside(x);
sz++;
}
void putout(int x) {
move_outside(x);
sz--;
}
int val() {
return press_button();
}
int min_cardinality(int N) {
n = N;
putin(0);
for (int i = 1;i < n;i++) {
putin(i);
if (val() == 2) {
putout(i);
rem.insert(i);
}
}
int type = sz;
if (type == n) return 1;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |