Problem sort
User DuckyKayden
Submission Time 2026-01-15 07:46:57
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sort.cpp: In function ‘int32_t main()’:
sort.cpp:15:17: error: conversion from ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type’ {aka ‘char’} to non-scalar type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} requested
15 | string a = a[i];
| ^
sort.cpp:16:8: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘std::vector<long long int>’)
16 | cout << a << " ";
| ~~~~ ^~ ~
| | |
| | std::vector<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: