Submission #289006

#TimeUsernameProblemLanguageResultExecution timeMemory
289006shrek12357Gap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <climits>
#include <cmath>
#include <fstream>
#include <queue>
//#include "gondola.h"
using namespace std;
 
long long findGap(int t, int n) {
	if (t == 2) {
		return 0;
	}
	long long max = 1e18 + 1;
	long long pre = 0;
	long long ans = 0;
	for (int i = 0; i < n; i++) {
		long long mn, mx;
		MinMax(1, max, &mn, &mx);
		if (i == 0) {
			pre = mx;
			max = mx - 1;
		}
		else {
			if (pre - mx > ans) {
				ans = pre - mx;
			}
			pre = mx;
			max = mx - 1;
		}
	}
	return ans;
}

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:23:3: error: 'MinMax' was not declared in this scope
   23 |   MinMax(1, max, &mn, &mx);
      |   ^~~~~~