# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
628611 | galca | Rarest Insects (IOI22_insects) | C++17 | 375 ms | 336 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 <vector>
using namespace std;
int min_cardinality(int N) {
vector<int> vec1;
vector<int> vec2;
for (int i = 0; i < N; i++) {
vec1.push_back(i);
}
vector<int> distinct;
for (int i = 0; i < vec1.size(); i++) {
move_inside(vec1[i]);
int res = press_button();
if (res != 1) {
move_outside(vec1[i]);
vec2.push_back(vec1[i]);
}
else {
distinct.push_back(vec1[i]);
}
}
int num_sets = distinct.size();
if (num_sets == N) {
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... |