Submission #1027602

# Submission time Handle Problem Language Result Execution time Memory
1027602 2024-07-19T07:56:40 Z stdfloat Gap (APIO16_gap) C++17
Compilation error
0 ms 0 KB
#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 = 0, t = (ll)1e18, ans = LLONG_MAX;
	while (s + 1 < t) {
		ll x, y;
		MinMax(s + 1, t - 1, &x, &y);

		if (x == -1) return min(ans, t - s);
	
		ans = min({ans, x - s, t - y});
		s = x; t = y;
	}

	return min(ans, t - s);
}

Compilation message

/usr/bin/ld: /tmp/ccCAoizG.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/cc0QosME.o:gap.cpp:(.text+0x1c0): first defined here
/usr/bin/ld: /tmp/ccCAoizG.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc0QosME.o:gap.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status