제출 #119105

#제출 시각아이디문제언어결과실행 시간메모리
119105Charis02Gap (APIO16_gap)C++14
0 / 100
57 ms3072 KiB
#include <stdio.h> #include <stdlib.h> #include <iostream> #include "gap.h" #define ll long long #define MAXV 1e18 using namespace std; long long solve1(int n) { return 2; } long long findGap(int T, int N) { if(T == 1) return solve1(N); long long a,b; MinMax(0LL,MAXV,&a,&b); ll dif = (b-a)/(N-1); ll k = 1; while(a < b) { ll w,x; //cout << a << " " << b << " " << call_count << " " << dif << endl; MinMax(a+1,a+dif*k,&x,&w); if(w == -1) { k++; continue; } if(k != 1) dif = max(dif,x-a); a = w; } return dif; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...