Problem lengthsort
User meeeee
Submission Time 2026-11-03 09:57:21
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lengthsort.cpp: In function ‘int main()’:
lengthsort.cpp:14:16: error: request for member ‘begin’ in ‘a’, which is of non-class type ‘std::string [n]’ {aka ‘std::__cxx11::basic_string<char> [n]’}
14 | stable_sort(a.begin(), a.end(), sort_by_length);
| ^~~~~
lengthsort.cpp:14:27: error: request for member ‘end’ in ‘a’, which is of non-class type ‘std::string [n]’ {aka ‘std::__cxx11::basic_string<char> [n]’}
14 | stable_sort(a.begin(), a.end(), sort_by_length);
| ^~~