제출 #643635

#제출 시각아이디문제언어결과실행 시간메모리
643635Vanilla드문 곤충 (IOI22_insects)C++17
0 / 100
1 ms208 KiB
#include <bits/stdc++.h> #include "insects.h" using namespace std; int min_cardinality(int n) { vector <bool> vis (n); int tp = 0; for (int i = 0; i < n; i++){ move_inside(i); if (press_button() == 2) { move_outside(i); } else { vis[i] = 1; tp++; } } for (int i = 2; i <= n; i++){ int d = 0; for (int j = 0; j < n; j++){ if (vis[j]) continue; move_inside(j); if (press_button() == i + 1) { move_outside(j); } else { vis[j] = 1; d++; } } if (d != tp) return i-1; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...