Problem lunchbox
User phoenixai0
Submission Time 2025-04-10 15:13:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:9:5: error: ‘vector’ was not declared in this scope
9 | 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:9:12: error: expected primary-expression before ‘int’
9 | vector<int> a(m);
| ^~~
lunchbox.cpp:11:16: error: ‘a’ was not declared in this scope
11 | cin >> a[i];
| ^
lunchbox.cpp:13:10: error: ‘a’ was not declared in this scope
13 | sort(a.begin(), a.end());
| ^
lunchbox.cpp:13:5: error: ‘sort’ was not declared in this scope; did you mean ‘qsort’?
13 | sort(a.begin(), a.end());
| ^~~~
| qsort