| Problem | lengthsort |
|---|---|
| User | KamiKaizhe |
| Submission Time | 2026-02-19 11:11:47 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
lengthsort.cpp: In function ‘int main()’:
lengthsort.cpp:14:19: error: ‘comp’ was not declared in this scope
14 | sort(arr, arr+n, comp);
| ^~~~
lengthsort.cpp:17:11: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘std::pair<std::__cxx11::basic_string<char>, long long int>’)
17 | cout << arr[i] << "\n";
| ~~~~ ^~ ~~~~~~
| | |
| | std::pair<std::__cxx11::basic_string<char>, long long int>
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/9/istream:39,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,