Problem mountains
User YSH2020
Submission Time 2023-08-18 13:27:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

mountains.cpp: In function ‘int main()’:
mountains.cpp:5:36: error: ‘cin’ is not a class, namespace, or enumeration
5 | ios_base::sync_with_stdio(false); cin::tie(0)
| ^~~
mountains.cpp:6:21: error: ‘num’ was not declared in this scope; did you mean ‘enum’?
6 | int num; cin >> num;
| ^~~
| enum
mountains.cpp:7:60: error: ‘h’ was not declared in this scope
7 | long long h[num]; for (int i = 0; i < num; i++) cin >> h[i];
| ^
mountains.cpp:13:17: error: ‘h’ was not declared in this scope
13 | if (h[j] < h[i]) count1 ++;
| ^
mountains.cpp:15:45: error: ‘h’ was not declared in this scope
15 | for (int j = i+1; j < num; j++) if (h[j] < h[i]) count2++;
|