F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_25942175_18915.cpp:2:1: error: expected unqualified-id before '{' token
 { e[cnt].to = v; e[cnt].w = w; e[cnt].next = head[u]; head[u] = cnt++; } void init()
 ^
0_0_25942175_18915.cpp: In function 'void init()':
0_0_25942175_18915.cpp:3:10: error: 'head' was not declared in this scope
 { memset(head,-1,sizeof(head)); cnt = 0; } void SPFA(int s)
          ^
0_0_25942175_18915.cpp:3:33: error: 'cnt' was not declared in this scope
 { memset(head,-1,sizeof(head)); cnt = 0; } void SPFA(int s)
                                 ^
0_0_25942175_18915.cpp: In function 'void SPFA(int)':
0_0_25942175_18915.cpp:4:3: error: 'queue' was not declared in this scope
 { queue<int> q; int now,to; memset(vis,false,sizeof(vis)); memset(dis,INF,sizeof(dis)); dis[s] = 0; vis[s] = true; q.push(s); while(!q.empty()) { now = q.front(); q.pop(); vis[now] = false; for(int i = head[now]; i != -1; i = e[i].next) { to = e[i].to; if(dis[to] > dis[now] + e[i].w) { dis[to] = dis[now] + e[i].w; if(!vis[to]) { vis[to] = true; q.push(to); } } } } } int BFS()
   ^
0_0_25942175_18915.cpp:4:3: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:85,
                 from 0_0_25942175_18915.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:96:11: note:   'std::queue'
     class queue
           ^
0_0_25942175_18915.cpp:4:9: error: expected primary-expression before 'int'
 { queue<int> q; int now,to; memset(vis,false,sizeof(vis)); memset(dis,INF,sizeof(dis)); dis[s] = 0; vis[s] = true; q.push(s); while(!q.empty()) { now = q.front(); q.pop(); vis[now] = false; for(int i = head[now]; i != -1; i = e[i].next) { to = e[i].to; if(dis[to] > dis[now] + e[i].w) { dis[to] = dis[now] + e[i].w; if(!vis[to]) { vis[to] = true; q.push(to); } } } } } int BFS()
         ^
0_0_25942175_18915.cpp:4:36: error: 'vis' was not declared in this scope
 { queue<int> q; int now,to; memset(vis,false,sizeof(vis)); memset(dis,INF,sizeof(dis)); dis[s] = 0; vis[s] = true; q.push(s); while(!q.empty()) { now = q.front(); q.pop(); vis[now] = false; for(int i = head[now]; i != -1; i = e[i].next) { to = e[i].to; if(dis[to] > dis[now] + e[i].w) { dis[to] = dis[now] + e[i].w; if(!vis[to]) { vis[to] = true; q.push(to); } } } } } int BFS()
                                    ^
0_0_25942175_18915.cpp:4:67: error: 'dis' was not declared in this scope
 { queue<int> q; int now,to; memset(vis,false,sizeof(vis)); memset(dis,INF,sizeof(dis)); dis[s] = 0; vis[s] = true; q.push(s); while(!q.empty()) { now = q.front(); q.pop(); vis[now] = false; for(int i = head[now]; i != -1; i = e[i].next) { to = e[i].to; if(dis[to] > dis[now] + e[i].w) { dis[to] = dis[now] + e[i].w; if(!vis[to]) { vis[to] = true; q.push(to); } } } } } int BFS()
                                                                   ^
0_0_25942175_18915.cpp:4:71: error: 'INF' was not declared in this scope
 { queue<int> q; int now,to; memset(vis,false,sizeof(vis)); memset(dis,INF,sizeof(dis)); dis[s] = 0; vis[s] = true; q.push(s); while(!q.empty()) { now = q.front(); q.pop(); vis[now] = false; for(int i = head[now]; i != -1; i = e[i].next) { to = e[i].to; if(dis[to] > dis[now] + e[i].w) { dis[to] = dis[now] + e[i].w; if(!vis[to]) { vis[to] = true; q.push(to); } } } } } int BFS()
                                                                       ^
0_0_25942175_18915.cpp:4:116: error: 'q' was not declared in this scope
 { queue<int> q; int now,to; memset(vis,false,sizeof(vis)); memset(dis,INF,sizeof(dis)); dis[s] = 0; vis[s] = true; q.push(s); while(!q.empty()) { now = q.front(); q.pop(); vis[now] = false; for(int i = head[now]; i != -1; i = e[i].next) { to = e[i].to; if(dis[to] > dis[now] + e[i].w) { dis[to] = dis[now] + e[i].w; if(!vis[to]) { vis[to] = true; q.push(to); } } } } } int BFS()
                                                                                                                    ^
0_0_25942175_18915.cpp:4:203: error: 'head' was not declared in this scope
 { queue<int> q; int now,to; memset(vis,false,sizeof(vis)); memset(dis,INF,sizeof(dis)); dis[s] = 0; vis[s] = true; q.push(s); while(!q.empty()) { now = q.front(); q.pop(); vis[now] = false; for(int i = head[now]; i != -1; i = e[i].next) { to = e[i].to; if(dis[to] > dis[now] + e[i].w) { dis[to] = dis[now] + e[i].w; if(!vis[to]) { vis[to] = true; q.push(to); } } } } } int BFS()
                                                                                                                                                                                                           ^
0_0_25942175_18915.cpp:4:227: error: 'e' was not declared in this scope
 { queue<int> q; int now,to; memset(vis,false,sizeof(vis)); memset(dis,INF,sizeof(dis)); dis[s] = 0; vis[s] = true; q.push(s); while(!q.empty()) { now = q.front(); q.pop(); vis[now] = false; for(int i = head[now]; i != -1; i = e[i].next) { to = e[i].to; if(dis[to] > dis[now] + e[i].w) { dis[to] = dis[now] + e[i].w; if(!vis[to]) { vis[to] = true; q.push(to); } } } } } int BFS()
                                                                                                                                                                                                                                   ^
0_0_25942175_18915.cpp: In function 'int BFS()':
0_0_25942175_18915.cpp:5:10: error: 'dis' was not declared in this scope
 { memset(dis,-1,sizeof(dis)); queue<int> q; dis[S] = 0; q.push(S); while(!q.empty()) { int u = q.front(); q.pop(); for(int i = head[u]; i != -1; i = e[i].next) { int v = e[i].to; if(dis[v] == -1 && e[i].w > 0) { dis[v] = dis[u] + 1; q.push(v); } } } return dis[T] != -1; } int DFS(int u,int exp)
          ^
0_0_25942175_18915.cpp:5:31: error: 'queue' was not declared in this scope
 { memset(dis,-1,sizeof(dis)); queue<int> q; dis[S] = 0; q.push(S); while(!q.empty()) { int u = q.front(); q.pop(); for(int i = head[u]; i != -1; i = e[i].next) { int v = e[i].to; if(dis[v] == -1 && e[i].w > 0) { dis[v] = dis[u] + 1; q.push(v); } } } return dis[T] != -1; } int DFS(int u,int exp)
                               ^
0_0_25942175_18915.cpp:5:31: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:85,
                 from 0_0_25942175_18915.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:96:11: note:   'std::queue'
     class queue
           ^
0_0_25942175_18915.cpp:5:37: error: expected primary-expression before 'int'
 { memset(dis,-1,sizeof(dis)); queue<int> q; dis[S] = 0; q.push(S); while(!q.empty()) { int u = q.front(); q.pop(); for(int i = head[u]; i != -1; i = e[i].next) { int v = e[i].to; if(dis[v] == -1 && e[i].w > 0) { dis[v] = dis[u] + 1; q.push(v); } } } return dis[T] != -1; } int DFS(int u,int exp)
                                     ^
0_0_25942175_18915.cpp:5:49: error: 'S' was not declared in this scope
 { memset(dis,-1,sizeof(dis)); queue<int> q; dis[S] = 0; q.push(S); while(!q.empty()) { int u = q.front(); q.pop(); for(int i = head[u]; i != -1; i = e[i].next) { int v = e[i].to; if(dis[v] == -1 && e[i].w > 0) { dis[v] = dis[u] + 1; q.push(v); } } } return dis[T] != -1; } int DFS(int u,int exp)
                                                 ^
0_0_25942175_18915.cpp:5:57: error: 'q' was not declared in this scope
 { memset(dis,-1,sizeof(dis)); queue<int> q; dis[S] = 0; q.push(S); while(!q.empty()) { int u = q.front(); q.pop(); for(int i = head[u]; i != -1; i = e[i].next) { int v = e[i].to; if(dis[v] == -1 && e[i].w > 0) { dis[v] = dis[u] + 1; q.push(v); } } } return dis[T] != -1; } int DFS(int u,int exp)
                                                         ^
0_0_25942175_18915.cpp:5:128: error: 'head' was not declared in this scope
 { memset(dis,-1,sizeof(dis)); queue<int> q; dis[S] = 0; q.push(S); while(!q.empty()) { int u = q.front(); q.pop(); for(int i = head[u]; i != -1; i = e[i].next) { int v = e[i].to; if(dis[v] == -1 && e[i].w > 0) { dis[v] = dis[u] + 1; q.push(v); } } } return dis[T] != -1; } int DFS(int u,int exp)
                                                                                                                                ^
0_0_25942175_18915.cpp:5:150: error: 'e' was not declared in this scope
 { memset(dis,-1,sizeof(dis)); queue<int> q; dis[S] = 0; q.push(S); while(!q.empty()) { int u = q.front(); q.pop(); for(int i = head[u]; i != -1; i = e[i].next) { int v = e[i].to; if(dis[v] == -1 && e[i].w > 0) { dis[v] = dis[u] + 1; q.push(v); } } } return dis[T] != -1; } int DFS(int u,int exp)
                                                                                                                                                      ^
0_0_25942175_18915.cpp:5:262: error: 'T' was not declared in this scope
 { memset(dis,-1,sizeof(dis)); queue<int> q; dis[S] = 0; q.push(S); while(!q.empty()) { int u = q.front(); q.pop(); for(int i = head[u]; i != -1; i = e[i].next) { int v = e[i].to; if(dis[v] == -1 && e[i].w > 0) { dis[v] = dis[u] + 1; q.push(v); } } } return dis[T] != -1; } int DFS(int u,int exp)
                                                                                                                                                                                                                                                                      ^
0_0_25942175_18915.cpp: In function 'int DFS(int, int)':
0_0_25942175_18915.cpp:6:11: error: 'T' was not declared in this scope
 { if(u == T) return exp; int flow = 0,temp = 0; for(int i = head[u]; i != -1; i = e[i].next) { int v = e[i].to; if(dis[v] == dis[u] + 1 && e[i].w > 0) { temp = DFS(v,min(exp,e[i].w)); if(!temp) continue; exp -


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-12-02 03:40:53, Gzip enabled