Problem lunchbox
User smartsword
Submission Time 2025-03-26 16:00:54
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp:3:2: error: invalid preprocessing directive #using
3 | #using namespace std;
| ^~~~~
lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:10:2: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
10 | cin >> n >> m;
| ^~~
| std::cin
In file included from lunchbox.cpp:2:
/usr/include/c++/9/iostream:60:18: note: ‘std::cin’ declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
lunchbox.cpp:19:2: error: ‘sort’ was not declared in this scope; did you mean ‘qsort’?
19 | sort (a, a+m);
| ^~~~
| qsort
lunchbox.cpp:21:19: error: expected ‘;’ before ‘<’ token
21 | for (int i = 0, i < m; i++){
| ^~
| ;
lunchbox.cpp:21:20: error: expected primary-expression before ‘<’ token
21 | for (int i = 0, i < m; i++){
|