Submission #623479

#TimeUsernameProblemLanguageResultExecution timeMemory
623479tekiBoxes with souvenirs (IOI15_boxes)C++11
Compilation error
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

Compilation message (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