Problem | peakfinding |
---|---|
User | Hytoh |
Submission Time | 2023-03-29 16:35:50 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
peakfinding.cpp:4:5: error: cannot declare ‘::main’ to be a global variable
4 | int main {
| ^~~~
peakfinding.cpp:5:2: error: expected primary-expression before ‘int’
5 | int mountains;
| ^~~
peakfinding.cpp:5:2: error: expected ‘}’ before ‘int’
peakfinding.cpp:4:10: note: to match this ‘{’
4 | int main {
| ^
peakfinding.cpp:6:2: error: ‘cin’ does not name a type
6 | cin >> mountains;
| ^~~
peakfinding.cpp:7:22: error: ‘n’ was not declared in this scope
7 | int ans = 0, height[n];
| ^
peakfinding.cpp:8:2: error: expected unqualified-id before ‘for’
8 | for (int i = 0; i < mountains; i++) {
| ^~~
peakfinding.cpp:8:18: error: ‘i’ does not name a type
8 | for (int i = 0; i < mountains; i++) {
| ^
peakfinding.cpp:8:33: error: ‘i’ does not name a type
8 | for (int i = 0; i < m