Submission #746901

# Submission time Handle Problem Language Result Execution time Memory
746901 2023-05-23T08:23:38 Z vjudge1 Calvinball championship (CEOI15_teams) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;

long long delivery(int N, int K, int L, vector<int> positions) {
	long long ans = 0;
	for (int i = N - 1; i >= 0; i -= K) {
		if (positions[max(0, i - K + 1)] > L / 2)
			ans += 2 * (L - positions[i - K + 1]);
		else if (positions[i] > L / 2)
			ans += L;
		else
			ans += 2 * positions[i];
		cerr << positions[i] << ", " << ans << endl;
	}
	return ans;
}

Compilation message

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status