Problem rollercoaster
User potatoed78
Submission Time 2025-06-20 13:38:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

rollercoaster.cpp: In function ‘int main()’:
rollercoaster.cpp:2:2: error: ‘ios_base’ has not been declared
2 | ios_base::sync_with_stdio(0);
| ^~~~~~~~
rollercoaster.cpp:3:5: error: ‘cin’ was not declared in this scope
3 | cin.tie(0);
| ^~~
rollercoaster.cpp:4:5: error: ‘cout’ was not declared in this scope
4 | cout.tie(0);
| ^~~~
rollercoaster.cpp:10:5: error: ‘set’ was not declared in this scope
10 | set <int> heights;
| ^~~
rollercoaster.cpp:10:10: error: expected primary-expression before ‘int’
10 | set <int> heights;
| ^~~
rollercoaster.cpp:14:9: error: ‘heights’ was not declared in this scope
14 | heights.insert(a[i]);
| ^~~~~~~
rollercoaster.cpp:19:22: error: ‘prev’ was not declared in this scope
19 | cout << *prev(heights.end()) - *heights.begin() << " ";
|