제출 #623479

#제출 시각아이디문제언어결과실행 시간메모리
623479teki선물상자 (IOI15_boxes)C++11
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #ifndef LOCAL_DEBUG #include "boxes.h" #endif #define pb push_back #define MS(x,y) memset((x), (y), sizeof((x))) typedef long long ll; const ll MN = 1000000007; using namespace std; ll delivery (int n, int k, int l, vector<int> pos) { ll res = 0; for (int i = 0; i<n; i++) res += min(pos[i],l-pos[i]); return res; } #ifdef LOCAL_DEBUG int main() { #ifdef LOCAL_DEBUG fstream cin("in.txt"); #endif ios_base::sync_with_stdio(false); cout.tie(0); cin.tie(0); } #endif

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

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