제출 #1027606

#제출 시각아이디문제언어결과실행 시간메모리
1027606GangstaGap (APIO16_gap)C++14
0 / 100
34 ms2896 KiB
#include "bits/stdc++.h" #include "gap.h" #define ll long long #define pb push_back #define pii pair<ll,ll> #define ff first #define ss second #define sz size() const int N = 2e5 + 1; using namespace std; ll ans; // void MinMax(ll s, ll t, ll &mn, ll &mx){ // int a, b; // cin >> a >> b; // mn = a; // mx = b; // } ll findGap(int t, int n){ ll mn = 0, mx = 1e18, tmp, tmp1; if(t == 1){ while(1){ tmp = mn+1, tmp1 = mx-1; if(tmp > tmp1) return ans; MinMax(tmp, tmp1, &mn, &mx); if(mn == -1) return ans; ans = max({ans,mn-tmp+1, tmp1-mx+1}); } } } // int main(){ // int n, t; // cin >> t >> n; // cout << findGap(t, n); // }

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

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:34:1: warning: control reaches end of non-void function [-Wreturn-type]
   34 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...