Problem lunchbox
User eliasxyz
Submission Time 2025-05-24 18:23:43
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:8:6: error: ‘i’ was not declared in this scope
8 | for(i=0;i<m;i++){
| ^
lunchbox.cpp:13:9: error: request for member ‘begin’ in ‘A’, which is of non-class type ‘int [m]’
13 | sort(A.begin(),A.end()); //sorting algorithm?
| ^~~~~
lunchbox.cpp:13:19: error: request for member ‘end’ in ‘A’, which is of non-class type ‘int [m]’
13 | sort(A.begin(),A.end()); //sorting algorithm?
| ^~~
lunchbox.cpp:14:5: error: ‘sum’ was not declared in this scope
14 | if(sum(A)<=N){
| ^~~