Problem lunchbox
User kkai
Submission Time 2024-02-19 23:42:08
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:10:8: error: request for member ‘push_back’ in ‘schs’, which is of non-class type ‘std::vector<int> [m]’
10 | schs.push_back(number);
| ^~~~~~~~~
lunchbox.cpp:13:12: error: request for member ‘begin’ in ‘schs’, which is of non-class type ‘std::vector<int> [m]’
13 | sort(schs.begin(),schs.end());
| ^~~~~
lunchbox.cpp:13:25: error: request for member ‘end’ in ‘schs’, which is of non-class type ‘std::vector<int> [m]’
13 | sort(schs.begin(),schs.end());
| ^~~
lunchbox.cpp:14:14: error: no match for ‘operator>’ (operand types are ‘std::vector<int>’ and ‘int’)
14 | if (schs[0] > N){
| ~~~~~~~ ^ ~
| | |
| | int
| std::vector<int>
In file included from /usr/include/c++/9/regex:62,
from /usr/include/