Submission #71776

# Submission time Handle Problem Language Result Execution time Memory
71776 2018-08-25T15:22:06 Z λf.(λx.f (x x)) (λx.f (x x))(#2248, jhuni) The Ant Doing Hard Work (FXCUP3_ant) C++
100 / 100
3 ms 440 KB
#include "ant.h"
#include <algorithm>
using namespace std;

int FindK() {
    int lo = 1;
    int hi = 99999999;
    int init = 66666666;
    int c = DeliverCount(init);
    if (c == 0) lo = init + 1;
    else {
        hi = init/c;
        lo = init/(c+1);
    }
    while(lo < hi){
        int mid = (lo+hi)>>1;
        if (DeliverCount(mid))hi=mid;
        else lo=mid+1;
    }
    return lo;
}
# Verdict Execution time Memory Grader output
1 Correct 3 ms 248 KB Correct
2 Correct 2 ms 356 KB Correct
3 Correct 2 ms 356 KB Correct
4 Correct 2 ms 440 KB Correct
5 Correct 2 ms 440 KB Correct