Submission #1331617

#TimeUsernameProblemLanguageResultExecution timeMemory
1331617uranhishigBoxes with souvenirs (IOI15_boxes)C++20
Compilation error
0 ms0 KiB
#include "boxes.h"
#include<bits/stdc++.h>
using namespace std;
#define int long long

int delivery(int n, int k, int l, int p[]) {
    int x = (l + 1)/2;
    int ans;
    for (int i = 0; i < n; i++) {
        if(p[i] < x) {
            ans += p[i] + p[i];
        }
        else {
            ans += l;
        }
    }
    return ans;
}

Compilation message (stderr)

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