Problem ranges
User kiwiwi
Submission Time 2025-06-20 16:26:57
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ranges.cpp: In function ‘int main()’:
ranges.cpp:28:19: error: expected ‘,’ or ‘;’ before ‘=’ token
28 | vector<ll> a2(n) = sort(a.begin(), a.end());
| ^
ranges.cpp:30:19: error: cannot convert ‘std::vector<long long int>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’} to ‘int’ in initialization
30 | int temp = a2.end();
| ~~~~~~^~
| |
| std::vector<long long int>::iterator {aka __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >}
ranges.cpp:42:22: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’)
42 | cout << temp << " " << it;
| ~~~~~~~~~~~~~~~~~~~ ^~ ~~
| |