Submission

Status:
Compilation Error

Score: 0

User: Marszpace

Problemset: Ice cream

Language: cpp

Time: 0.000 second

Submitted On: 2025-04-23 22:55:07

#include<bits/stdc++.h>
#include "ice_cream.h"
using namespace std;

double ratio=(sqrt(5.0)-1.0)/2.0;

int guess(int N){
	int l=1, r=N;
	
	while(r>l){
		int d=(r-l+1)*ratio;
		if(ask(l,l+d)){
			r=l+d;
		}
		else{
			l=l+d+1;
		}
	}
	return l;
}