Problem cpictrain
User neoaix
Submission Time 2026-06-24 10:54:40
Score 0
Max Time N/A
Max Memory N/A

Compile Error

cpictrain.cpp: In function ‘int main()’:
cpictrain.cpp:36:32: error: expected primary-expression before ‘int’
36 | int dist_cur = abs(int i - mid);
| ^~~
cpictrain.cpp:37:33: error: expected primary-expression before ‘int’
37 | int dist_best = abs(int best_cab-mid);
| ^~~
cpictrain.cpp:38:17: error: ‘dist_cur’ was not declared in this scope
38 | if (dist_cur < dist_best){
| ^~~~~~~~
cpictrain.cpp:41:26: error: expected initializer before ‘<’ token
41 | if (int i<best_cab){
| ^
cpictrain.cpp:41:26: error: expected ‘)’ before ‘<’ token
41 | if (int i<best_cab){
| ~ ^
| )