Submission #1008483

#TimeUsernameProblemLanguageResultExecution timeMemory
1008483oyberRarest Insects (IOI22_insects)C++17
0 / 100
1 ms344 KiB
#include "insects.h" #include <bits/stdc++.h> using namespace std; int min_cardinality(int N) { vector<bool> used(N); int types = 0; for (int i = 0; i < N; i++) { move_inside(i); if (press_button() > 1) { move_outside(i); continue; } types++; used[i] = true; } for (int num = 2; num <= N; num++) { int added = 0; for (int i = 0; i < N; i++) { if (used[i]) continue; move_inside(i); if (press_button() > num) { move_outside(i); continue; } added++; used[i] = true; } if (added != types) { return num-1; } } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...