Problem lunchbox
User urmom
Submission Time 2023-11-06 10:59:18
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp:3:7: error: expected nested-name-specifier before ‘namesapce’
3 | using namesapce std;
| ^~~~~~~~~
lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:6:2: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
6 | cin>>n>>m;
| ^~~
| 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:9:8: error: ‘a’ was not declared in this scope
9 | cin>>a[i];
| ^
lunchbox.cpp:12:5: error: ‘sort’ was not declared in this scope; did you mean ‘std::sort’?
12 | sort(arr,arr+x);
| ^~~~
| 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