제출 #54461

#제출 시각아이디문제언어결과실행 시간메모리
54461MoNsTeR_CuBe선물상자 (IOI15_boxes)C++17
컴파일 에러
0 ms0 KiB
//#include "boxes.h" #include <bits/stdc++.h> using namespace std; #define int long long #define INF 9223372036854775807 vector<int> DP; int cost(int a, int b, int c){ int ans = c; ans = min(ans, (c-(a-1))*2); ans = min(ans, b); return ans; } int f(int n, int l, int k){ int ans = INF; for(int i = 1; i < k; i++){ DP[n] = min(ans, f(n-i, l, k)+cost(n-i,n,l)); } return ans; } long long delivery(int N, int K, int L, int p[]) { return f(N,L,K); } /* signed main(){ int N, K, L; cin >> N >> K >> L; int tab[N]; DP.resize(N); for(int i = 0; i < N; i++){ cin >> tab[i]; } #undef int long long cout << delivery(N,K,L,tab) << endl; } */

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

boxes.cpp: In function 'long long int delivery(long long int, long long int, long long int, long long int*)':
boxes.cpp:24:47: warning: unused parameter 'p' [-Wunused-parameter]
 long long delivery(int N, int K, int L, int p[]) {
                                               ^
/tmp/ccR6IIKd.o: In function `main':
grader.c:(.text.startup+0x22f): undefined reference to `delivery(int, int, int, int*)'
collect2: error: ld returned 1 exit status