Submission #728431

#TimeUsernameProblemLanguageResultExecution timeMemory
728431AndrijaMBoxes with souvenirs (IOI15_boxes)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; const long long maxn=2e5+10; long long delivery(long long n, long long K, long long l, long long p[]) { long long ans=0; long long k=K; for(long long i=0;i<n;i++) { if(k==0) { k=K; ans+=min(2*p[i-1],l); } k--; } if(k!=0) ans+=min(2*p[n-1],l); return ans; }

Compilation message (stderr)

/usr/bin/ld: /tmp/cc1aSOCP.o: in function `main':
grader.c:(.text.startup+0x1ef): undefined reference to `delivery(int, int, int, int*)'
collect2: error: ld returned 1 exit status