0_0_20045835_21191.cpp: In function 'void spfa(int)':
0_0_20045835_21191.cpp:4:5: error: 'queue' was not declared in this scope
queue<int>q;
^
0_0_20045835_21191.cpp:4:11: error: expected primary-expression before 'int'
queue<int>q;
^
0_0_20045835_21191.cpp:5:12: error: 'vis' was not declared in this scope
memset(vis,0,sizeof(vis));
^
0_0_20045835_21191.cpp:5:29: error: 'memset' was not declared in this scope
memset(vis,0,sizeof(vis));
^
0_0_20045835_21191.cpp:6:12: error: 'used' was not declared in this scope
memset(used,0,sizeof(used));
^
0_0_20045835_21191.cpp:7:16: error: 'n' was not declared in this scope
for(i=1;i<=n;i++)
^
0_0_20045835_21191.cpp:8:9: error: 'dis' was not declared in this scope
dis[i]=i==sx?0:INF;
^
0_0_20045835_21191.cpp:8:24: error: 'INF' was not declared in this scope
dis[i]=i==sx?0:INF;
^
0_0_20045835_21191.cpp:11:5: error: 'q' was not declared in this scope
q.push(sx);
^
0_0_20045835_21191.cpp:17:15: error: 'head' was not declared in this scope
for(i=head[u];i!=-1;i=edge[i].next)
^
0_0_20045835_21191.cpp:17:31: error: 'edge' was not declared in this scope
for(i=head[u];i!=-1;i=edge[i].next)
^
0_0_20045835_21191.cpp:20:16: error: 'dis' was not declared in this scope
if(dis[top]>dis[u]+edge[i].w)
^
0_0_20045835_21191.cpp:28:34: error: 'n' was not declared in this scope
if(used[top]>n)
^
0_0_20045835_21191.cpp:30:38: error: 'printf' was not declared in this scope
printf("-1\n");
^
0_0_20045835_21191.cpp:37:8: error: 'dis' was not declared in this scope
if(dis[n]==INF)
^
0_0_20045835_21191.cpp:37:12: error: 'n' was not declared in this scope
if(dis[n]==INF)
^
0_0_20045835_21191.cpp:37:16: error: 'INF' was not declared in this scope
if(dis[n]==INF)
^
0_0_20045835_21191.cpp:38:18: error: 'printf' was not declared in this scope
printf("-2\n");
^
0_0_20045835_21191.cpp:40:25: error: 'printf' was not declared in this scope
printf("%d\n",dis[n]);
^
|