제출 #776294

#제출 시각아이디문제언어결과실행 시간메모리
776294mousebeaver드문 곤충 (IOI22_insects)C++17
0 / 100
1 ms248 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 = 0; j < N; j++) { if(card[j] == -1) { move_inside(j); machine.push_back(j); if(press_button() < (int) machine.size()) { move_outside(j); machine.pop_back(); } } } for(int j : machine) { card[j] = machine.size(); } } } 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...