Problem lunchbox
User Jaffia
Submission Time 2026-06-24 21:37:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:3:5: error: ‘cin’ was not declared in this scope
3 | cin >> N >> m;
| ^~~
lunchbox.cpp:4:5: error: ‘vector’ was not declared in this scope
4 | vector<int> nooflunchboxes(m); // declaring vector
| ^~~~~~
lunchbox.cpp:4:12: error: expected primary-expression before ‘int’
4 | vector<int> nooflunchboxes(m); // declaring vector
| ^~~
lunchbox.cpp:6:16: error: ‘nooflunchboxes’ was not declared in this scope
6 | cin >> nooflunchboxes[i]; // this is inputting
| ^~~~~~~~~~~~~~
lunchbox.cpp:8:10: error: ‘nooflunchboxes’ was not declared in this scope
8 | sort(nooflunchboxes.begin(),nooflunchboxes.end()); // sorting
| ^~~~~~~~~~~~~~
lunchbox.cpp:8:5: error: ‘sort’ was not declared in this scope; did you mean ‘short’?
8 | sort(nooflunchboxes.b