Problem | lis_easy |
---|---|
User | god |
Submission Time | 2025-07-10 10:40:12 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lis_easy.cpp: In function ‘int main()’:
lis_easy.cpp:10:2: error: ‘sort’ was not declared in this scope; did you mean ‘qsort’?
10 | sort(array, array+x);
| ^~~~
| qsort
lis_easy.cpp:11:2: error: ‘vector’ was not declared in this scope
11 | vector<int> list_of_lengths; int longest_length = 1;
| ^~~~~~
lis_easy.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;
lis_easy.cpp:11:9: error: expected primary-expression before ‘int’
11 | vector<int> list_of_lengths; int longest_length = 1;
| ^~~
lis_easy.cpp:14:8: error: ‘list_of_lengths’ was not declared in this scope
14 | else list_of_lengths.push_back(longest_length); longest_length = 1;
| ^~~~~~~~~~~~~~~
lis_easy.cpp:16:2: error: ‘list_of_lengths’ was not d