Submission #977922

# Submission time Handle Problem Language Result Execution time Memory
977922 2024-05-08T13:59:06 Z KasymK Boxes with souvenirs (IOI15_boxes) C++17
Compilation error
0 ms 0 KB
#include "bits/stdc++.h"

using namespace std;

long long delivery(int n, int k, int l, vector<int> v){
    if(k == 1){
        long long answer = 0;
        for(int &i : v)
            answer += min(i, l - i) << 1;
        return answer;
    }
}

Compilation message

boxes.cpp: In function 'long long int delivery(int, int, int, std::vector<int>)':
boxes.cpp:5:24: warning: unused parameter 'n' [-Wunused-parameter]
    5 | long long delivery(int n, int k, int l, vector<int> v){
      |                    ~~~~^
boxes.cpp:12:1: warning: control reaches end of non-void function [-Wreturn-type]
   12 | }
      | ^
/usr/bin/ld: /tmp/ccCijQO1.o: in function `main':
grader.c:(.text.startup+0x1ef): undefined reference to `delivery(int, int, int, int*)'
collect2: error: ld returned 1 exit status