제출 #1210059

#제출 시각아이디문제언어결과실행 시간메모리
1210059sula2선물상자 (IOI15_boxes)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #define all(a) a.begin(), a.end() #define popcount(x) __builtin_popcountll(x) using namespace std; using namespace chrono; long long delivery(int n, int k, int l, int* positions) { int mx = 0, mn = l; for (int i = 0; i < n; i++) { mx = max(mx, positions[i]); mn = min(mn, positions[i]); } return min({ mx*2, 2*(l - mn), l }); } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int a[] = {1, 2, 5}; cout << delivery(3, 3, 8, a); }

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/ccs3H9ji.o: in function `main':
grader.c:(.text.startup+0x0): multiple definition of `main'; /tmp/ccwwnTjG.o:boxes.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status