Submission #881712

#TimeUsernameProblemLanguageResultExecution timeMemory
881712spdlingA Plus B (IOI23_aplusb)C++17
Compilation error
0 ms0 KiB
int* smallest_sums(int N, int A[], int B[]) { int* ans = new int[N](); int ans_n = 0; int i = 0, j = 0; while (ans_n < N) { ans[ans_n] = A[i] + B[j]; ans_n++; if (A[i] + B[j+1] < A[i+1] + B[j]) { ++j; } else { ++i; } } return ans; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccEAdrMQ.o: in function `main':
grader.cpp:(.text.startup+0x271): undefined reference to `smallest_sums(int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status