제출 #413005

#제출 시각아이디문제언어결과실행 시간메모리
413005jjjGap (APIO16_gap)C++14
0 / 100
44 ms1924 KiB
#include "gap.h" #define MAXN 100010 long long a[MAXN]; long long findGap(int T, int N) { long long mn = 0, mx = 0; MinMax(0, 1e18 + 1, &mn, &mx); a[0] = mn; a[N - 1] = mx; int l = 1, r = N - 2; while(l <= r) { MinMax(a[l - 1], a[r + 1], &mn, &mx); a[l] = mn; a[r] = mx; l++; r--; } long long x = 0; for(int i = 0; i < N - 1; i++) if(a[i + 1] - a[i] > x) x = a[i + 1] - a[i]; return x; }

컴파일 시 표준 에러 (stderr) 메시지

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:30:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   30 |     for(int i = 0; i < N - 1; i++)
      |     ^~~
gap.cpp:33:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   33 |  return x;
      |  ^~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...