Submission #549777

#TimeUsernameProblemLanguageResultExecution timeMemory
549777PherokungGap (APIO16_gap)C++14
0 / 100
49 ms2328 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 l=1,r=1e18,mn,mx,ans; while(V.size() < n){ MinMax(l,r,&mn,&mx); V.push_back(mn); if(mx != mn) V.push_back(mx); l = mn + 1, r = mx - 1; } return ans; } }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:10:24: warning: comparison of integer expressions of different signedness: 'std::vector<long long int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   10 |         while(V.size() < n){
      |               ~~~~~~~~~^~~
gap.cpp:7:16: warning: control reaches end of non-void function [-Wreturn-type]
    7 |     vector<ll> V;
      |                ^
gap.cpp:16:16: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
   16 |         return ans;
      |                ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...