candies.cpp: In function 'int* distribute_candies(int*, int*, int*, int*)':
candies.cpp:4:18: warning: 'sizeof' on array function parameter 'c' will return size of 'int*' [-Wsizeof-array-argument]
4 | int N = sizeof(c) / sizeof(c[0]);
| ~^~
candies.cpp:3:29: note: declared here
3 | int* distribute_candies(int c[], int l[], int r[], int v[]) {
| ~~~~^~~
candies.cpp:5:18: warning: 'sizeof' on array function parameter 'l' will return size of 'int*' [-Wsizeof-array-argument]
5 | int Q = sizeof(l) / sizeof(l[0]);
| ~^~
candies.cpp:3:38: note: declared here
3 | int* distribute_candies(int c[], int l[], int r[], int v[]) {
| ~~~~^~~
candies.cpp:15:10: warning: address of local variable 'S' returned [-Wreturn-local-addr]
15 | return S;
| ^
candies.cpp:6:7: note: declared here
6 | int S[N + 1] = {0};
| ^
/usr/bin/ld: /tmp/ccCUVWdU.o: in function `main':
grader.cpp:(.text.startup+0x30e): undefined reference to `distribute_candies(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status