Submission #746901

#TimeUsernameProblemLanguageResultExecution timeMemory
746901vjudge1Calvinball championship (CEOI15_teams)C++17
Compilation error
0 ms0 KiB
#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 (stderr)

/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