제출 #786124

#제출 시각아이디문제언어결과실행 시간메모리
786124khshg드문 곤충 (IOI22_insects)C++17
10 / 100
292 ms336 KiB
#include"insects.h" #include<bits/stdc++.h> using namespace std; int min_cardinality(int N) { vector<int> Ls{0}, cnt(N, 1); move_inside(0); for(int i = 1; i < N; ++i) { move_inside(i); int ks = press_button(); if(ks == 1) { Ls.push_back(i); continue; } for(auto& u : Ls) { move_outside(u); ks = press_button(); move_inside(u); if(ks == 1) { ++cnt[u]; break; } } move_outside(i); } int ans = 0x3f3f3f3f; for(auto& u : Ls) ans = min(ans, cnt[u]); return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...