foo.cpp:6:1: error: expected ',' or ';' before 'long'
long long a[MAXN][MAXN],d[MAXN][MAXN];
^
foo.cpp: In function 'int main()':
foo.cpp:14:5: error: 'a' was not declared in this scope
a[i][j]=INF;
^
foo.cpp:18:5: error: 'a' was not declared in this scope
a[u-1][v-1]=w;
^
foo.cpp:24:5: error: 'd' was not declared in this scope
d[i][j]=a[i][j];
^
foo.cpp:24:13: error: 'a' was not declared in this scope
d[i][j]=a[i][j];
^
foo.cpp:29:14: error: 'd' was not declared in this scope
ans=min(d[i][j]+a[i][k]+a[k][j],ans);
^
foo.cpp:29:22: error: 'a' was not declared in this scope
ans=min(d[i][j]+a[i][k]+a[k][j],ans);
^
foo.cpp:32:6: error: 'd' was not declared in this scope
d[i][j]=min(d[i][j],d[i][k]+d[k][j]);
^