Submission #1340823

#TimeUsernameProblemLanguageResultExecution timeMemory
1340823javkhlantogsGap (APIO16_gap)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
#include "gap.h"
#define ll long long
using namespace std;
ll findGap(int T,int N){
	ll s=0;
	ll t=1e18;
	ll ans=0;
	ll mn,mx;
	MinMax(s,t,&mn,&mx);
	s=mn,t=mx;
	while(MinMax(s+1,t-1,&mn,&mx)){
		ans=max(ans,mn-s);
		ans=max(ans,t-mx);
		s=mn,t=mx;
	}
	ans=max(ans,t-s);
	return ans;
}

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:12:21: error: could not convert 'MinMax((s + 1), (t - 1), (& mn), (& mx))' from 'void' to 'bool'
   12 |         while(MinMax(s+1,t-1,&mn,&mx)){
      |               ~~~~~~^~~~~~~~~~~~~~~~~
      |                     |
      |                     void