Submission #1027762

#TimeUsernameProblemLanguageResultExecution timeMemory
1027762stdfloatGap (APIO16_gap)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "gap.h"
#include "grader.cpp"
using namespace std;

using ll = long long;

ll findGap(int T, int N) {
	ll s, t;
	MinMax(0, (ll)1e18, &s, &t);

	int cnt = 1;
	ll ans = 0;
	while (++cnt <= ((N + 1) >> 1) && s + 1 < t) {
		ll x, y;
		MinMax(s + 1, t - 1, &x, &y);

		if (x == -1) break;
	
		ans = max({ans, x - s, t - y});
		s = x; t = y;
	}

	return max(ans, t - s);
}

Compilation message (stderr)

/usr/bin/ld: /tmp/cc20nuC5.o: in function `MinMax(long long, long long, long long*, long long*)':
grader.cpp:(.text+0x0): multiple definition of `MinMax(long long, long long, long long*, long long*)'; /tmp/cc0qTB13.o:gap.cpp:(.text+0x1c0): first defined here
/usr/bin/ld: /tmp/cc20nuC5.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc0qTB13.o:gap.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status