Problem rollercoaster
User Shauryaw
Submission Time 2025-06-20 13:02:39
Score 0
Max Time N/A
Max Memory N/A

Compile Error

rollercoaster.cpp: In function ‘int main()’:
rollercoaster.cpp:8:2: error: expected ‘,’ or ‘;’ before ‘int’
8 | int arr[n];
| ^~~
rollercoaster.cpp:10:10: error: ‘arr’ was not declared in this scope
10 | cin >> arr[i]
| ^~~
rollercoaster.cpp:13:7: error: ‘arr’ was not declared in this scope
13 | sort(arr, arr +m;
| ^~~
rollercoaster.cpp:13:17: error: ‘m’ was not declared in this scope
13 | sort(arr, arr +m;
| ^
rollercoaster.cpp:14:2: error: ‘happy’ was not declared in this scope
14 | happy = 0
| ^~~~~
rollercoaster.cpp:17:18: error: ‘i’ was not declared in this scope
17 | for (int i = 0; i < n; i++) {
| ^