제출 #787617

#제출 시각아이디문제언어결과실행 시간메모리
787617Andrey드문 곤충 (IOI22_insects)C++17
0 / 100
1 ms296 KiB
#include "insects.h" #include<bits/stdc++.h> using namespace std; int n; bool check(int a) { vector<bool> bruh(n,true); int br = n; for(int i = 0; i < n; i++) { move_inside(i); if(press_button() > a) { bruh[a] = false; move_outside(i); br--; } } for(int i = 0; i < n; i++) { if(bruh[i]) { move_outside(i); } } if(br == n*a) { return false; } else { return true; } } int min_cardinality(int N) { n = N; int l = 1,r = n,m; while(l < r) { m = (l+r)/2; if(check(m)) { r = m; } else { l = m+1; } } return l; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...