Submission #1331623

#TimeUsernameProblemLanguageResultExecution timeMemory
1331623uranhishigBoxes 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

long long delivery(long long n, long long k, long long l, long long p[]) {
    long long ans = 0;
    for (long long i = 0; i < n; i++) {
        long long x = min(p[i], l - p[i]);
        ans += x + x;
    }
    return ans;
}

Compilation message (stderr)

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