0_0_20619508_3961.cpp: In function 'int main()': 0_0_20619508_3961.cpp:36:54: error: 'dist' was not declared in this scope ll res=dis[i-1] - dis[j] - (i-j-1) * dist[j]; ^