Submission #71692

# Submission time Handle Problem Language Result Execution time Memory
71692 2018-08-25T11:25:45 Z the_general(#2235, dbtlswkdrnss) The Ant Doing Hard Work (FXCUP3_ant) C++
6 / 100
3 ms 492 KB
#include "ant.h"

int FindK() {
	int i=1,l=0,r=0;
	while(i<100000000){
		if(DeliverCount(i)==0){
			i*=2;
		}
		else break;
	}
	l=i/2;
	r=((i>=100000000)?100000000:i);
	while(l<r-1){
		int mid=(l+r)/2;
		if(DeliverCount(mid)==0){
			l=mid;
		}
		else r=mid;
	}
	return r;
}
# Verdict Execution time Memory Grader output
1 Partially correct 2 ms 256 KB Partially correct : C = 52
2 Partially correct 2 ms 492 KB Partially correct : C = 52
3 Partially correct 2 ms 492 KB Partially correct : C = 40
4 Partially correct 2 ms 492 KB Partially correct : C = 52
5 Partially correct 3 ms 492 KB Partially correct : C = 40