제출 #237507

#제출 시각아이디문제언어결과실행 시간메모리
237507thtsshz_bgwrswhGap (APIO16_gap)C++17
0 / 100
45 ms2168 KiB
#pragma GCC optimize("Ofast") #include<stdio.h> #include<vector> #include<assert.h> #include<algorithm> #include "gap.h" using namespace std; vector<long long> num; long long findGap(int T,int N){ assert(0); if(T==1){ long long i,maxv=1000000000000000000,minv=0,ans,ans2; while(maxv>=minv){ MinMax(minv,maxv,&ans,&ans2); if(ans==-1||ans2==-1) break; if(ans==ans2){ num.emplace_back(ans); break; } num.emplace_back(ans); num.emplace_back(ans2); maxv=ans2-1; minv=ans+1; } sort(num.begin(),num.end()); assert(num.size()==N); ans=0; for(i=1;i<num.size();i++) ans=max(ans,num[i]-num[i-1]); return ans; } else{ return 0; } }

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

In file included from gap.cpp:4:0:
gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:27:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   assert(num.size()==N);
          ~~~~~~~~~~^~~
gap.cpp:29:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(i=1;i<num.size();i++)
           ~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...