제출 #977928

#제출 시각아이디문제언어결과실행 시간메모리
977928KasymK선물상자 (IOI15_boxes)C++17
컴파일 에러
0 ms0 KiB
#include "bits/stdc++.h" using namespace std; long long delivery(int n, int k, int l, vector<int> positions){ long long answer = 0; for(int &i : positions) answer += (min(i, l - i) << 1); return answer; }

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

boxes.cpp: In function 'long long int delivery(int, int, int, std::vector<int>)':
boxes.cpp:5:24: warning: unused parameter 'n' [-Wunused-parameter]
    5 | long long delivery(int n, int k, int l, vector<int> positions){
      |                    ~~~~^
boxes.cpp:5:31: warning: unused parameter 'k' [-Wunused-parameter]
    5 | long long delivery(int n, int k, int l, vector<int> positions){
      |                           ~~~~^
/usr/bin/ld: /tmp/cc2U0I8i.o: in function `main':
grader.c:(.text.startup+0x1ef): undefined reference to `delivery(int, int, int, int*)'
collect2: error: ld returned 1 exit status