Problem lunchbox
User Ant1234567890
Submission Time 2025-06-10 17:03:12
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:6:2: error: ‘vector’ was not declared in this scope
6 | vector<int>A(m);
| ^~~~~~
lunchbox.cpp:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include<iostream>
+++ |+#include <vector>
2 | using namespace std;
lunchbox.cpp:6:9: error: expected primary-expression before ‘int’
6 | vector<int>A(m);
| ^~~
lunchbox.cpp:8:8: error: ‘A’ was not declared in this scope
8 | cin>>A[i];
| ^
lunchbox.cpp:10:7: error: ‘A’ was not declared in this scope
10 | sort(A.begin(),A.end());
| ^
lunchbox.cpp:10:2: error: ‘sort’ was not declared in this scope; did you mean ‘qsort’?
10 | sort(A.begin(),A.end());
| ^~~~
| qsort
lunchbox.cpp:20:1: error: expected ‘}’ at end of input
20 | }
| ^
l