Problem rollercoaster
User ye
Submission Time 2025-06-20 15:23:35
Score 0
Max Time N/A
Max Memory N/A

Compile Error

rollercoaster.cpp: In function ‘int main()’:
rollercoaster.cpp:7:16: error: ‘i’ was not declared in this scope
7 | long long arr[i];
| ^
rollercoaster.cpp:9:2: error: expected initializer before ‘for’
9 | for (int i=0;i<a;i++){
| ^~~
rollercoaster.cpp:15:4: error: ‘curarr’ was not declared in this scope
15 | curarr.push_back(arr[i+no]));
| ^~~~~~
rollercoaster.cpp:15:21: error: ‘arr’ was not declared in this scope
15 | curarr.push_back(arr[i+no]));
| ^~~
rollercoaster.cpp:18:8: error: ‘curarr’ was not declared in this scope
18 | sort(curarr.begin(),curarr.end());
| ^~~~~~