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_19224882_28120.cpp:22:7: error: expected unqualified-id before ',' token
 double,int>
       ^
0_0_19224882_28120.cpp:22:8: error: expected unqualified-id before 'int'
 double,int>
        ^
0_0_19224882_28120.cpp:27:53: error: 'vector' does not name a type
 int N=200;int x[N], y[N], rudu[N];int earn, lost, n;vector<int> vect[N], vec[N];
                                                     ^
0_0_19224882_28120.cpp: In function 'void add_node(int, int, double, int, int)':
0_0_19224882_28120.cpp:34:85: error: 'vec' was not declared in this scope
 double val,int cap,int flow){    edge[edge_cnt]=node(from, to, val, cap, flow );    vec[from].push_back(edge_cnt++);} 
                                                                                     ^
0_0_19224882_28120.cpp: In function 'void build_graph()':
0_0_19224882_28120.cpp:35:75: error: 'vect' was not declared in this scope
 void build_graph(){    for(int i=1; i<=n; i++)    {        for(int j=0; j<vect[i].size(); j++)        {            
                                                                           ^
0_0_19224882_28120.cpp: In function 'double spfa(int, int)':
0_0_19224882_28120.cpp:40:30: error: 'deque' was not declared in this scope
 double spfa(int s,int e){    deque<int> que(1,s);    cost[s]=0;    flow[s]=INF;    inq[s]=1;    while(!que.empty())    {        
                              ^
0_0_19224882_28120.cpp:40:30: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/deque:64:0,
                 from 0_0_19224882_28120.cpp:17:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_deque.h:735:11: note:   'std::deque'
     class deque : protected _Deque_base<_Tp, _Alloc>
           ^
0_0_19224882_28120.cpp:40:36: error: expected primary-expression before 'int'
 double spfa(int s,int e){    deque<int> que(1,s);    cost[s]=0;    flow[s]=INF;    inq[s]=1;    while(!que.empty())    {        
                                    ^
0_0_19224882_28120.cpp:40:104: error: 'que' was not declared in this scope
 double spfa(int s,int e){    deque<int> que(1,s);    cost[s]=0;    flow[s]=INF;    inq[s]=1;    while(!que.empty())    {        
                                                                                                        ^
0_0_19224882_28120.cpp:41:83: error: 'vec' was not declared in this scope
 int x=que.front();        que.pop_front();        inq[x]=0;        for(int i=0; i<vec[x].size(); i++)        {            node e=edge[vec[x][i]];            if(e.cap>e.flow && cost[e.to]>cost[e.from]+e.val )            {                flow[e.to]=min(flow[e.from],e.cap-e.flow);                cost[e.to]=cost[e.from]+e.val;                path[e.to]=vec[x][i];                if(!inq[e.to])                {                    inq[e.to]=1;                    que.push_back(e.to);                }            }        }    }    return cost[e];} 
                                                                                   ^
0_0_19224882_28120.cpp:41:277: error: 'min' was not declared in this scope
 int x=que.front();        que.pop_front();        inq[x]=0;        for(int i=0; i<vec[x].size(); i++)        {            node e=edge[vec[x][i]];            if(e.cap>e.flow && cost[e.to]>cost[e.from]+e.val )            {                flow[e.to]=min(flow[e.from],e.cap-e.flow);                cost[e.to]=cost[e.from]+e.val;                path[e.to]=vec[x][i];                if(!inq[e.to])                {                    inq[e.to]=1;                    que.push_back(e.to);                }            }        }    }    return cost[e];} 
                                                                                                                                                                                                                                                                                     ^
0_0_19224882_28120.cpp:41:277: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
                 from 0_0_19224882_28120.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3444:5: note:   'std::min'
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^
0_0_19224882_28120.cpp: In function 'int main()':
0_0_19224882_28120.cpp:48:116: error: 'vect' was not declared in this scope
 int b, j=0;    while(scanf("%d", &n), n)    {        scanf("%d%d",&earn,&lost);        for(int i=0; i<=n+1; i++)   vect[i].clear();        for(int i=0; i<=n+1; i++)   vec[i].clear();        memset(edge,0,sizeof(edge));        memset(rudu,0,sizeof(rudu));        edge_cnt=0;        sum=0;         for(int i=1; i<=n; i++)        {            scanf("%d%d",&x[i],&y[i]);            while(scanf("%d",&b), b)    vect[i].push_back(b);          }        build_graph();        printf("Case %d: %.2f\n", ++j,  -(mcmf(0,n+1)+sum)+0.0000001 );    }    return 0;}
                                                                                                                    ^
0_0_19224882_28120.cpp:48:168: error: 'vec' was not declared in this scope
 int b, j=0;    while(scanf("%d", &n), n)    {        scanf("%d%d",&earn,&lost);        for(int i=0; i<=n+1; i++)   vect[i].clear();        for(int i=0; i<=n+1; i++)   vec[i].clear();        memset(edge,0,sizeof(edge));        memset(rudu,0,sizeof(rudu));        edge_cnt=0;        sum=0;         for(int i=1; i<=n; i++)        {            scanf("%d%d",&x[i],&y[i]);            while(scanf("%d",&b), b)    vect[i].push_back(b);          }        build_graph();        printf("Case %d: %.2f\n", ++j,  -(mcmf(0,n+1)+sum)+0.0000001 );    }    return 0;}
                                                                                                                                                                        ^
0_0_19224882_28120.cpp:48:407: error: 'vect' was not declared in this scope
 int b, j=0;    while(scanf("%d", &n), n)    {        scanf("%d%d",&earn,&lost);        for(int i=0; i<=n+1; i++)   vect[i].clear();        for(int i=0; i<=n+1; i++)   vec[i].clear();        memset(edge,0,sizeof(edge));        memset(rudu,0,sizeof(rudu));        edge_cnt=0;        sum=0;         for(int i=1; i<=n; i++)        {            scanf("%d%d",&x[i],&y[i]);            while(scanf("%d",&b), b)    vect[i].push_back(b);          }        build_graph();        printf("Case %d: %.2f\n", ++j,  -(mcmf(0,n+1)+sum)+0.0000001 );    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                       ^


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-11-27 03:49:15, Gzip enabled