Submission
Status:
Compilation Error
Score: 0
User: NovemNotes
Problemset: Ice cream
Language: cpp
Time: 0.000 second
Submitted On: 2025-04-22 16:22:16
#include <bits/stdc++.h>
using namespace std;
// int want;
// bool ask(int l,int r){
// return (want>=l && want<=r);
// }
int ice_cream(int n){
int l = 1,r = n;
while(l<r){
int mid = l+(r-l)/2;
if(ask(l,mid)){
r = mid;
}else{
l = mid+1;
}
}
return l;
}
// int main(){
// // cin.tie(nullptr)->sync_with_stdio(false);
// want = 200;
// cout << ice_cream(1000);
// return 0;
// }