# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
786149 | khshg | Rarest Insects (IOI22_insects) | C++17 | 1 ms | 208 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) {
set<int> alr;
int pr;
for(int j = 1; j < 100; ++j) {
int cnt = 0;
for(int i = 0; i < N; ++i) {
if(!alr.insert(i).second) continue;
move_inside(i);
int ks = press_button();
if(ks == i) { ++cnt; continue; }
alr.erase(i);
move_outside(i);
}
if(j > 1 && cnt != pr) {
return j - 1;
}
pr = cnt;
}
return -1;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |