제출 #825676

#제출 시각아이디문제언어결과실행 시간메모리
825676Minindu206커다란 상품 (IOI17_prize)C++14
0 / 100
0 ms208 KiB
#include "prize.h" #include<bits/stdc++.h> using namespace std; int find_best(int n) { int st = 0, en = n - 1; cout << st << " " << en << '\n'; while(en - st > 1) { int mid = (st + en) / 2; auto a = ask(mid); if(a[0] >= a[1]) en = mid; else st = mid + 1; // cout << a[0] << " " << a[1] << " " << st << " " << en << '\n'; } auto a = ask(st); if(a[0] + a[1] == 0) return st; return en; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...