boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:6:2: error: expected ',' or ';' before 'int'
int i;
^~~
boxes.cpp:7:10: error: 'i' was not declared in this scope
while(p[i] == 0)i++;
^
boxes.cpp:8:2: error: 'i' was not declared in this scope
i += K - 1;
^
boxes.cpp:9:12: error: 'n' was not declared in this scope
while(i < n && p[i] * 2 < L){
^
boxes.cpp:13:6: error: 'n' was not declared in this scope
i = n - k;
^
boxes.cpp:13:10: error: 'k' was not declared in this scope
i = n - k;
^