제출 #733912

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
7339122023-05-01 11:54:50MauveGap (APIO16_gap)C++14
30 / 100
49 ms1872 KiB
#include "gap.h"
#include <iostream>
using namespace std;
long long findGap(int T, int N){
long long mn = 0, mx = 0, r=N, l=1, a[N+1], right=1e18, left=0, k=0;
while(r>=l){
MinMax(left,right,&left,&right);
a[l]=left;
a[r]=right;
left++;
right--;
l++;
r--;
}
long long ans=0;
for(int i=1;i<N;i++) ans=max(ans,a[i+1]-a[i]);
return ans;
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:6:15: warning: unused variable 'mn' [-Wunused-variable]
    6 |     long long mn = 0, mx = 0, r=N, l=1, a[N+1], right=1e18, left=0, k=0;
      |               ^~
gap.cpp:6:23: warning: unused variable 'mx' [-Wunused-variable]
    6 |     long long mn = 0, mx = 0, r=N, l=1, a[N+1], right=1e18, left=0, k=0;
      |                       ^~
gap.cpp:6:69: warning: unused variable 'k' [-Wunused-variable]
    6 |     long long mn = 0, mx = 0, r=N, l=1, a[N+1], right=1e18, left=0, k=0;
      |                                                                     ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...