제출 #104407

#제출 시각아이디문제언어결과실행 시간메모리
104407Badral커다란 상품 (IOI17_prize)C++17
0 / 100
2 ms504 KiB
#include<bits/stdc++.h> #include "prize.h" using namespace std; int can(int k) { vector<int> cer = ask(k); if(cer[0] == 0 && cer[1] == 0) return 2; if(cer[0] == 1) return 0; return 1; } int find_best(int n) { int kk = 0; for(int i = n; i >= 1; i /= 2) { int p = can(i+kk); if(p == 2) return (i + kk); while(i+kk <= n && p == 1) kk += i; } return kk; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...