Submission
Status:
(%%%%%)
Score: 29
User: Namkhing
Problemset: Ice cream
Language: cpp
Time: 0.003 second
Submitted On: 2025-04-23 17:15:55
#include "ice_cream.h"
#include <bits/stdc++.h>
using namespace std;
const int seed = 1;
const double inf = 1e9;
const int N = 1510;
int n, a[N];
double dp[N];
int guess(int N) {
// write your solution here
srand(seed);
n = N;
int l = 1, r = n;
while (l < r) {
int mid = (l + r) / 2;
bool f = ask(l, mid);
if (f) r = mid;
else l = mid + 1;
}
return l;
}