Submission #283494

#TimeUsernameProblemLanguageResultExecution timeMemory
283494JoseCopasBoxes with souvenirs (IOI15_boxes)C++17
Compilation error
0 ms0 KiB
#include "boxes.h" #include "bits/stdc++.h" using namespace std; int delivery(int N, int K, int L, int p[]) { int c=0; if(K==1) { sort(p, p+N); for(int i=0;i<N;i++) { //cout<<p[i]<<" "; c+=min(L-p[i], p[i]); } } return c; } /* int main() { int n,k,l; cin>>n>>k>>l; int v[n]; for(int i=0;i<n;i++)cin>>v[i]; delivery(n,k,l,v); } */

Compilation message (stderr)

boxes.cpp:6:5: error: ambiguating new declaration of 'int delivery(int, int, int, int*)'
    6 | int delivery(int N, int K, int L, int p[])
      |     ^~~~~~~~
In file included from boxes.cpp:1:
boxes.h:4:11: note: old declaration 'long long int delivery(int, int, int, int*)'
    4 | long long delivery(int N, int K, int L, int p[]);
      |           ^~~~~~~~