Problem lengthsort
User AltheaZ
Submission Time 2023-06-30 12:45:43
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lengthsort.cpp: In function ‘int main()’:
lengthsort.cpp:6:7: error: expected primary-expression before ‘int’
6 | cin>>int n;
| ^~~
lengthsort.cpp:7:22: error: ‘n’ was not declared in this scope
7 | vector<string>words(n);
| ^
lengthsort.cpp:14:3: error: ‘maxele’ was not declared in this scope
14 | maxele=distance(0,max_element(length.begin(),length.end()));
| ^~~~~~
lengthsort.cpp:14:21: error: ‘max_element’ was not declared in this scope
14 | maxele=distance(0,max_element(length.begin(),length.end()));
| ^~~~~~~~~~~
lengthsort.cpp:16:9: error: ‘class std::vector<std::__cxx11::basic_string<char> >’ has no member named ‘pop’
16 | words.pop(maxele);
| ^~~