Problem platonic5
User MokSiewQi
Submission Time 2025-06-19 13:36:21
Score 0
Max Time N/A
Max Memory N/A

Compile Error

platonic5.cpp: In function ‘int main()’:
platonic5.cpp:7:11: error: ‘m’ was not declared in this scope
7 | int p[m];
| ^
platonic5.cpp:9:16: error: ‘p’ was not declared in this scope
9 | cin >> p[i]
| ^
platonic5.cpp:12:5: error: expected ‘,’ or ‘;’ before ‘ans’
12 | ans += abs(p[0]-1);
| ^~~
platonic5.cpp:14:19: error: ‘p’ was not declared in this scope
14 | ans+= abs(p[i]-p[i-1]);
| ^
platonic5.cpp:16:17: error: ‘n’ was not declared in this scope
16 | ans += abs (n-p[m-1]);
| ^
platonic5.cpp:16:19: error: ‘p’ was not declared in this scope
16 | ans += abs (n-p[m-1]);
| ^