Submission #549776

#TimeUsernameProblemLanguageResultExecution timeMemory
549776PherokungGap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
#include "gap.h" #include<bits/stdc++.h> using namespace std; #define ll long long ll findGap(int T, int N) { vector<ll> V; if(T == 1){ ll be,ed,ans=0; Minmax(1,1e18,be,ed); V.push_back(be), V.push_back(ed); while(ed - be > 1){ Minmax(be+1,ed-1,be,ed); } if(be == ed) V.push_back(ed); sort(V.begin(),V.end()); for(int i=1;i<V.size();i++) ans = max(ans,V[i]-V[i-1]); return ans; } }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:10:9: error: 'Minmax' was not declared in this scope; did you mean 'MinMax'?
   10 |         Minmax(1,1e18,be,ed);
      |         ^~~~~~
      |         MinMax
gap.cpp:17:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |         for(int i=1;i<V.size();i++) ans = max(ans,V[i]-V[i-1]);
      |                     ~^~~~~~~~~
gap.cpp:7:16: warning: control reaches end of non-void function [-Wreturn-type]
    7 |     vector<ll> V;
      |                ^