Problem sort
User oiu890
Submission Time 2024-02-13 15:21:59
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sort.cpp: In function ‘int main()’:
sort.cpp:8:24: error: invalid static_cast from type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to type ‘u28’ {aka ‘__int128 unsigned’}
8 | n = static_cast<u28>(n);
| ^
sort.cpp:9:13: error: could not convert ‘n’ from ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘long unsigned int’
9 | u28 lst[n];
| ^
sort.cpp:9:13: error: size of array ‘lst’ has non-integral type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}
sort.cpp:10:18: error: no match for ‘operator<’ (operand types are ‘u28’ {aka ‘__int128 unsigned’} and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
10 | for(u28 i=0;i<n;i++){
| ~^~
| | |
| | std::string {aka std::__cxx11::basic_string<char>}
| u28 {aka __int128 unsigned}