Submission #336207

#TimeUsernameProblemLanguageResultExecution timeMemory
336207seedkinGap (APIO16_gap)C11
0 / 100
38 ms2028 KiB
#include "gap.h" long long arr[100001]; long long findGap(int T, int N) { if(T == 1) { long long min = 0; long long max = 1e18; int minIdx = 0; int maxIdx = N-1; int maxIter = (N+1)/2; long long low; long long high; for(int i = 0; i < maxIter; i++) { MinMax(min, max, &low, &high); arr[minIdx++] = low; arr[maxIdx--] = high; min = low; max = high; } long long result = 0; for(int i =0; i < N-1; i++) { if(arr[i+1] - arr[i] > result ) result = arr[i+1] - arr[i]; } return result; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...