Submission #71720

#TimeUsernameProblemLanguageResultExecution timeMemory
71720chobo (#119)The Ant Doing Hard Work (FXCUP3_ant)C++98
18 / 100
3 ms548 KiB
#include "ant.h"

#include <stdio.h>
#include <algorithm>
using namespace std;

int FindK() {
	int s=1,e=1e8-1,m;

	while(s<=e){
        m=(s+e+e)/3;


        int res=DeliverCount(m);
        if(res){
            s=max(s,m/(res+1)+1);
            e=min(e,m/res-1);
        }
        else s=m+1;
	}

	return s;
}
#Verdict Execution timeMemoryGrader output
Fetching results...