답안 #71716

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
71716 2018-08-25T13:02:30 Z 유애나(#2242, kdh9949) 일하는 개미 (FXCUP3_ant) C++17
0 / 100
3 ms 256 KB
#include "ant.h"

const int T = 33333333;

int q(int x){ return DeliverCount(x); }

int FindK(){
    int t = q(2 * T), l, r;
    if(t >= 2){ l = 1; r = T; }
    else if(t == 1){ l = T + 1; r = 2 * T; }
    else{ l = 2 * T + 1; r = 3 * T; }
    while(l < r){
        int m = (l + r) / 2;
        if(q(m + 1)) l = m + 1;
        else r = m;
    }
    return r;
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 3 ms 256 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -