Submission #1317559

#TimeUsernameProblemLanguageResultExecution timeMemory
1317559eri16Gap (APIO16_gap)C++20
0 / 100
2117 ms589824 KiB
#include <bits/stdc++.h>
#include "gap.h"

using namespace std;

using ll = long long;

ll findGap(int t, int n){
	vector <ll> v;
	
	ll mn=0,mx=1e18;
	
	while (mn<=mx){
	    MinMax(0,1e18,&mn,&mx);
	    
	    if (mn!=-1){v.push_back(mn);}mn++;
	    if (mx!=-1){v.push_back(mx);}mx--;;	    
	}
	
	sort(v.begin(),v.end());
	
	ll ans=0;
	
	for (int i=1; i<n; i++){
	    ans=max(ans,v[i]-v[i-1]);
	}
}

Compilation message (stderr)

gap.cpp: In function 'll findGap(int, int)':
gap.cpp:27:1: warning: no return statement in function returning non-void [-Wreturn-type]
   27 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...