제출 #260792

#제출 시각아이디문제언어결과실행 시간메모리
260792T0p_Gap (APIO16_gap)C++14
0 / 100
65 ms4120 KiB
#include <bits/stdc++.h> #include "gap.h" using namespace std; vector<long long> v; long long findGap(int m, int n) { long long s = -1, t = 2e18, mn, mx, ans = 0; if(m == 1) { while(s < t) { MinMax(s, t, &mn, &mx); v.push_back(mn); v.push_back(mx); s = mn + 1; t = mx - 1; } assert(v.size() == n); sort(v.begin(), v.end()); for(int i=1 ; i<n ; i++) ans = max(ans, v[i] - v[i-1]); return ans; } else { } }

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

In file included from /usr/include/c++/7/cassert:44:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:33,
                 from gap.cpp:1:
gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:20:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   assert(v.size() == n);
          ~~~~~~~~~^~~~
gap.cpp:30:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...