0_0_19230897_28029.cpp:18:14: error: unable to find numeric literal operator 'operator""bool'
#define MAXN 1005bool reach[MAXN][MAXN];
^
0_0_19230897_28029.cpp:19:9: note: in expansion of macro 'MAXN'
int map[MAXN][MAXN];
^
0_0_19230897_28029.cpp:18:14: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
#define MAXN 1005bool reach[MAXN][MAXN];
^
0_0_19230897_28029.cpp:19:9: note: in expansion of macro 'MAXN'
int map[MAXN][MAXN];
^
0_0_19230897_28029.cpp:18:23: error: expected ']' before 'reach'
#define MAXN 1005bool reach[MAXN][MAXN];
^
0_0_19230897_28029.cpp:19:9: note: in expansion of macro 'MAXN'
int map[MAXN][MAXN];
^
0_0_19230897_28029.cpp:19:13: error: expected unqualified-id before ']' token
int map[MAXN][MAXN];
^
0_0_19230897_28029.cpp:19:19: error: expected unqualified-id before ']' token
int map[MAXN][MAXN];
^
0_0_19230897_28029.cpp:18:14: error: unable to find numeric literal operator 'operator""bool'
#define MAXN 1005bool reach[MAXN][MAXN];
^
0_0_19230897_28029.cpp:21:7: note: in expansion of macro 'MAXN'
int d[MAXN],n;
^
0_0_19230897_28029.cpp:18:14: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
#define MAXN 1005bool reach[MAXN][MAXN];
^
0_0_19230897_28029.cpp:21:7: note: in expansion of macro 'MAXN'
int d[MAXN],n;
^
0_0_19230897_28029.cpp:18:23: error: expected ']' before 'reach'
#define MAXN 1005bool reach[MAXN][MAXN];
^
0_0_19230897_28029.cpp:21:7: note: in expansion of macro 'MAXN'
int d[MAXN],n;
^
0_0_19230897_28029.cpp:21:11: error: expected unqualified-id before ']' token
int d[MAXN],n;
^
0_0_19230897_28029.cpp: In function 'void BFS(int)':
0_0_19230897_28029.cpp:28:69: error: 'd' was not declared in this scope
int i,j; pt now,next; queue<pt> q; now.x=x; now.d=0; d[now.x]=now.d; q.push(now); while(!q.empty()) { now=q.front(); q.pop(); if (now.d>n+2) break; for(i=1;i<=map[now.x][0];i++) { next.x=map[now.x][i]; next.d=now.d+1; if (next.d<d[next.x]) { d[next.x]=next.d; q.push(next); reach[x][next.x]=1; } } }}
^
0_0_19230897_28029.cpp:28:182: error: 'n' was not declared in this scope
int i,j; pt now,next; queue<pt> q; now.x=x; now.d=0; d[now.x]=now.d; q.push(now); while(!q.empty()) { now=q.front(); q.pop(); if (now.d>n+2) break; for(i=1;i<=map[now.x][0];i++) { next.x=map[now.x][i]; next.d=now.d+1; if (next.d<d[next.x]) { d[next.x]=next.d; q.push(next); reach[x][next.x]=1; } } }}
^
0_0_19230897_28029.cpp:28:212: error: 'map' was not declared in this scope
int i,j; pt now,next; queue<pt> q; now.x=x; now.d=0; d[now.x]=now.d; q.push(now); while(!q.empty()) { now=q.front(); q.pop(); if (now.d>n+2) break; for(i=1;i<=map[now.x][0];i++) { next.x=map[now.x][i]; next.d=now.d+1; if (next.d<d[next.x]) { d[next.x]=next.d; q.push(next); reach[x][next.x]=1; } } }}
^
0_0_19230897_28029.cpp:28:423: error: 'reach' was not declared in this scope
int i,j; pt now,next; queue<pt> q; now.x=x; now.d=0; d[now.x]=now.d; q.push(now); while(!q.empty()) { now=q.front(); q.pop(); if (now.d>n+2) break; for(i=1;i<=map[now.x][0];i++) { next.x=map[now.x][i]; next.d=now.d+1; if (next.d<d[next.x]) { d[next.x]=next.d; q.push(next); reach[x][next.x]=1; } } }}
^
0_0_19230897_28029.cpp: In function 'int main()':
0_0_19230897_28029.cpp:32:51: error: 'n' was not declared in this scope
int m,k,i,x,y,z,j,sum; while(scanf("%d %d %s",&n,&m,s)!=EOF) { memset(reach,0,sizeof(reach)); for(i=1;i<=n;i++) reach[i][i]=1; memset(map,0,sizeof(map)); for(i=1;i<=m;i++) { scanf("%d %d %d",&x,&y,&z); x++;y++; if (z>0) {reach[x][y]=1;map[x][++map[x][0]]=y;} } for(i=1;i<=n;i++) { for(j=1;j<=n;j++) d[j]=0x1fffff; BFS(i); } sum=0; for(i=1;i<=n;i++) for(j=1;j<=n;j++) sum+=reach[i][j]; printf("%d\n",sum); } return 0;}
^
0_0_19230897_28029.cpp:32:81: error: 'reach' was not declared in this scope
int m,k,i,x,y,z,j,sum; while(scanf("%d %d %s",&n,&m,s)!=EOF) { memset(reach,0,sizeof(reach)); for(i=1;i<=n;i++) reach[i][i]=1; memset(map,0,sizeof(map)); for(i=1;i<=m;i++) { scanf("%d %d %d",&x,&y,&z); x++;y++; if (z>0) {reach[x][y]=1;map[x][++map[x][0]]=y;} } for(i=1;i<=n;i++) { for(j=1;j<=n;j++) d[j]=0x1fffff; BFS(i); } sum=0; for(i=1;i<=n;i++) for(j=1;j<=n;j++) sum+=reach[i][j]; printf("%d\n",sum); } return 0;}
^
0_0_19230897_28029.cpp:32:161: error: 'map' was not declared in this scope
int m,k,i,x,y,z,j,sum; while(scanf("%d %d %s",&n,&m,s)!=EOF) { memset(reach,0,sizeof(reach)); for(i=1;i<=n;i++) reach[i][i]=1; memset(map,0,sizeof(map)); for(i=1;i<=m;i++) { scanf("%d %d %d",&x,&y,&z); x++;y++; if (z>0) {reach[x][y]=1;map[x][++map[x][0]]=y;} } for(i=1;i<=n;i++) { for(j=1;j<=n;j++) d[j]=0x1fffff; BFS(i); } sum=0; for(i=1;i<=n;i++) for(j=1;j<=n;j++) sum+=reach[i][j]; printf("%d\n",sum); } return 0;}
^
0_0_19230897_28029.cpp:32:385: error: 'd' was not declared in this scope
int m,k,i,x,y,z,j,sum; while(scanf("%d %d %s",&n,&m,s)!=EOF) { memset(reach,0,sizeof(reach)); for(i=1;i<=n;i++) reach[i][i]=1; memset(map,0,sizeof(map)); for(i=1;i<=m;i++) { scanf("%d %d %d",&x,&y,&z); x++;y++; if (z>0) {reach[x][y]=1;map[x][++map[x][0]]=y;} } for(i=1;i<=n;i++) { for(j=1;j<=n;j++) d[j]=0x1fffff; BFS(i); } sum=0; for(i=1;i<=n;i++) for(j=1;j<=n;j++) sum+=reach[i][j]; printf("%d\n",sum); } return 0;}
^
|