Problem | trains |
---|---|
User | Dolphy |
Submission Time | 2023-09-09 10:49:18 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
trains.cpp:3:34: error: use of parameter outside function body before ‘+’ token
3 | int calculate(int n, int height[n+2], int cost[n+2], int index){
| ^
trains.cpp:3:37: error: expected ‘)’ before ‘,’ token
3 | int calculate(int n, int height[n+2], int cost[n+2], int index){
| ~ ^
| )
trains.cpp:3:39: error: expected unqualified-id before ‘int’
3 | int calculate(int n, int height[n+2], int cost[n+2], int index){
| ^~~
trains.cpp:10:5: error: expected initializer before ‘int’
10 | int n;
| ^~~
trains.cpp:11:2: error: ‘cin’ does not name a type
11 | cin >> n;
| ^~~
trains.cpp:12:13: error: ‘n’ was not declared in this scope
12 | int height[n+2], cost[n+2];
| ^
trains.cpp:12:24: error: ‘n’ was not declar