Submission #1109368

#TimeUsernameProblemLanguageResultExecution timeMemory
1109368TitanicXDzzGap (APIO16_gap)C++17
0 / 100
46 ms2868 KiB
#include "gap.h" #include<bits/stdc++.h> using namespace std; long long findGap(int T, int N) { if(T==1){ long long mn,mx,s,t; s=0; t=1e18; mn=1; mx=2; long long maxi=0; MinMax(s,t,&mn,&mx); long long x=mn,y=mx; long long i=0; while(mn!=mx){ if(i==1){ maxi=max(maxi,mn-x); maxi=max(maxi,mx-y); x=mn; y=mx; } else i=1; MinMax(mn+1,mx-1,&mn,&mx); } if(mn==-1){ maxi=max(maxi,y-x); } else{ maxi=max(maxi,mx-x); maxi=max(maxi,y-mx); } return maxi; } }

Compilation message (stderr)

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