Submission #71780

# Submission time Handle Problem Language Result Execution time Memory
71780 2018-08-25T15:29:59 Z Give_Me_Vita(#2255, gs13105) The Ant Doing Hard Work (FXCUP3_ant) C++17
90 / 100
3 ms 604 KB
#include "ant.h"

int FindK()
{
    int s = 1;
    int g = 99999999;
    while(s < g)
    {
        int x = (s + g) / 2;

        int t = DeliverCount(x);

        if(t > 1)
            g = x - 1;
        else if(t == 1)
            g = x;
        else
            s = x + 1;
    }
	return s;
}
# Verdict Execution time Memory Grader output
1 Partially correct 3 ms 256 KB Partially correct : C = 27
2 Partially correct 2 ms 488 KB Partially correct : C = 27
3 Partially correct 3 ms 564 KB Partially correct : C = 27
4 Partially correct 3 ms 604 KB Partially correct : C = 27
5 Partially correct 3 ms 604 KB Partially correct : C = 27