Problem ranges
User kiwiwi
Submission Time 2025-06-20 16:26:03
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:18: error: cannot convert ‘std::vector<long long int>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’} to ‘ll’ {aka ‘long long int’} in initialization
30 | ll temp = a2.end();
| ~~~~~~^~
| |
| std::vector<long long int>::iterator {aka __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >}
ranges.cpp:33:21: error: expected ‘;’ before ‘for’
33 | prefixSum[0] = b[0]
| ^
| ;
34 |
35 | for (int i = 1; i < n; i++) {
| ~~~
ranges.cpp:35:18: error: ‘i’ was not declared in this scope
35 |