Problem lunchbox
User YH
Submission Time 2024-02-04 12:50:07
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp:3:7: error: expected nested-name-specifier before ‘namepsace’
3 | using namepsace std;
| ^~~~~~~~~
lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:8:2: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
8 | cin >> a >> b;
| ^~~
| std::cin
In file included from lunchbox.cpp:1:
/usr/include/c++/9/iostream:60:18: note: ‘std::cin’ declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
lunchbox.cpp:18:2: error: ‘sort’ was not declared in this scope; did you mean ‘std::sort’?
18 | sort(boxes, boxes+b);
| ^~~~
| std::sort
In file included from /usr/include/c++/9/algorithm:71,
from lunchbox.cpp:2:
/usr/include/c++/9/pstl/glue_algorithm_defs.h:296:1: note: ‘std::sort’ declared here
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator _