답안 #1029831

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1029831 2024-07-21T11:44:48 Z stdfloat Gap (APIO16_gap) C++17
컴파일 오류
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, t;
	MinMax(0, (ll)1e18, &s, &t);

	ll d = (t - s - 1) / (n - 1), mx = 0, a = s;
	while (s + 1 < t) {
		ll x, y;
		MinMax(s + 1, min(s + d, t - 1), &x, &y);

		if (x != -1) {
			mx = max(mx, x - a); a = y;
		}

		s += d;
	}

	return max(mx, t - a);
}

Compilation message

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