Problem trains
User Yizhou
Submission Time 2024-06-06 11:11:11
Score 0
Max Time N/A
Max Memory N/A

Compile Error

trains.cpp: In function ‘int main()’:
trains.cpp:21:34: error: ‘k’ was not declared in this scope
21 | mincost[i]=min(mincost[i],(i-k)*(i-k)+mincost[k]);
| ^