Submission #71720

# Submission time Handle Problem Language Result Execution time Memory
71720 2018-08-25T13:23:26 Z chobo(#2238, andy627) The Ant Doing Hard Work (FXCUP3_ant) C++
18 / 100
3 ms 548 KB
#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 time Memory Grader output
1 Partially correct 3 ms 248 KB Partially correct : C = 42
2 Partially correct 2 ms 404 KB Partially correct : C = 38
3 Correct 3 ms 404 KB Correct
4 Partially correct 3 ms 404 KB Partially correct : C = 42
5 Correct 2 ms 548 KB Correct