Submission #776303

#TimeUsernameProblemLanguageResultExecution timeMemory
776303mousebeaverRarest Insects (IOI22_insects)C++17
10 / 100
229 ms308 KiB
#include <bits/stdc++.h> #include "insects.h" using namespace std; int min_cardinality(int N) { vector<int> card(N, -1); for(int i = 0; i < N; i++) { if(card[i] == -1) { move_inside(i); vector<int> machine = {i}; for(int j = i+1; j < N; j++) { if(card[j] == -1) { move_inside(j); machine.push_back(j); int state = press_button(); if(state != (int) machine.size()) { move_outside(j); machine.pop_back(); } } } for(int j : machine) { card[j] = machine.size(); move_outside(j); } } } return *min_element(card.begin(), card.end()); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...