제출 #1015097

#제출 시각아이디문제언어결과실행 시간메모리
1015097vjudge1Gap (APIO16_gap)C++17
0 / 100
22 ms3508 KiB
#include "gap.h" #include <bits/stdc++.h> using namespace std; #define int long long int findGap(signed t,signed n) { int a[n],i=0,j=n-1,*mn,*mx,lim1=0,lim2=1e18; while (i<=j) { MinMax(lim1,lim2,mn,mx); a[i++]=*mn; a[j--]=*mx; lim1=*mn+1; lim2=*mx-1; } int ans=0; for (int i=0;i<n-1;i++) ans=max(ans,a[i+1]-a[i]); return ans; }

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

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:13:9: warning: 'mn' may be used uninitialized in this function [-Wmaybe-uninitialized]
   13 |   MinMax(lim1,lim2,mn,mx);
      |   ~~~~~~^~~~~~~~~~~~~~~~~
gap.cpp:13:9: warning: 'mx' may be used uninitialized in this function [-Wmaybe-uninitialized]
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...