/ Vijos /

记录详情

Compile Error

foo.cpp:1:1: error: 'include' does not name a type
 include<cstdio>
 ^
foo.cpp:10:1: error: 'ptype' does not name a type
 ptype q[2000];
 ^
foo.cpp: In function 'int main()':
foo.cpp:16:20: error: 'scanf' was not declared in this scope
 scanf("%d %d",&n,&m); for (int i=0;i<m;i++) { for (int j=0;j<n;j++) scanf("%d",&y[i][j]); } memset(zt,false,sizeof(zt)); q[f].v=0; for (int i=0;i<n;i++) { q[f].a[i]=1; q[f].v=2; q[f].v+=1; } q[f].t=0; zt[q[f].v]=true; int x; while (f!=r) { for (int i=0;i<m;i++) { q[r]=q[f]; x=0; for (int j=0;j<n;j++) { if (y[i][j]==1) q[r].a[j]=0; if (y[i][j]==-1) q[r].a[j]=1; x=2; x+=q[r].a[j]; } if (zt[x]==false) { q[r].v=x; q[r].t++; zt[x]=true; r++; } if (x==0) {ans=q[f].t+1;break;} } if (ans!=0) break; f++; } if (ans==0) printf("The patient will be dead."); else printf("%d",ans); return 0; }
                    ^
foo.cpp:16:119: error: 'memset' was not declared in this scope
 scanf("%d %d",&n,&m); for (int i=0;i<m;i++) { for (int j=0;j<n;j++) scanf("%d",&y[i][j]); } memset(zt,false,sizeof(zt)); q[f].v=0; for (int i=0;i<n;i++) { q[f].a[i]=1; q[f].v=2; q[f].v+=1; } q[f].t=0; zt[q[f].v]=true; int x; while (f!=r) { for (int i=0;i<m;i++) { q[r]=q[f]; x=0; for (int j=0;j<n;j++) { if (y[i][j]==1) q[r].a[j]=0; if (y[i][j]==-1) q[r].a[j]=1; x=2; x+=q[r].a[j]; } if (zt[x]==false) { q[r].v=x; q[r].t++; zt[x]=true; r++; } if (x==0) {ans=q[f].t+1;break;} } if (ans!=0) break; f++; } if (ans==0) printf("The patient will be dead."); else printf("%d",ans); return 0; }
                                                                                                                       ^
foo.cpp:16:122: error: 'q' was not declared in this scope
 scanf("%d %d",&n,&m); for (int i=0;i<m;i++) { for (int j=0;j<n;j++) scanf("%d",&y[i][j]); } memset(zt,false,sizeof(zt)); q[f].v=0; for (int i=0;i<n;i++) { q[f].a[i]=1; q[f].v=2; q[f].v+=1; } q[f].t=0; zt[q[f].v]=true; int x; while (f!=r) { for (int i=0;i<m;i++) { q[r]=q[f]; x=0; for (int j=0;j<n;j++) { if (y[i][j]==1) q[r].a[j]=0; if (y[i][j]==-1) q[r].a[j]=1; x=2; x+=q[r].a[j]; } if (zt[x]==false) { q[r].v=x; q[r].t++; zt[x]=true; r++; } if (x==0) {ans=q[f].t+1;break;} } if (ans!=0) break; f++; } if (ans==0) printf("The patient will be dead."); else printf("%d",ans); return 0; }
                                                                                                                          ^
foo.cpp:16:550: error: 'printf' was not declared in this scope
 scanf("%d %d",&n,&m); for (int i=0;i<m;i++) { for (int j=0;j<n;j++) scanf("%d",&y[i][j]); } memset(zt,false,sizeof(zt)); q[f].v=0; for (int i=0;i<n;i++) { q[f].a[i]=1; q[f].v=2; q[f].v+=1; } q[f].t=0; zt[q[f].v]=true; int x; while (f!=r) { for (int i=0;i<m;i++) { q[r]=q[f]; x=0; for (int j=0;j<n;j++) { if (y[i][j]==1) q[r].a[j]=0; if (y[i][j]==-1) q[r].a[j]=1; x=2; x+=q[r].a[j]; } if (zt[x]==false) { q[r].v=x; q[r].t++; zt[x]=true; r++; } if (x==0) {ans=q[f].t+1;break;} } if (ans!=0) break; f++; } if (ans==0) printf("The patient will be dead."); else printf("%d",ans); return 0; }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ^
foo.cpp:16:573: error: 'printf' was not declared in this scope
 scanf("%d %d",&n,&m); for (int i=0;i<m;i++) { for (int j=0;j<n;j++) scanf("%d",&y[i][j]); } memset(zt,false,sizeof(zt)); q[f].v=0; for (int i=0;i<n;i++) { q[f].a[i]=1; q[f].v=2; q[f].v+=1; } q[f].t=0; zt[q[f].v]=true; int x; while (f!=r) { for (int i=0;i<m;i++) { q[r]=q[f]; x=0; for (int j=0;j<n;j++) { if (y[i][j]==1) q[r].a[j]=0; if (y[i][j]==-1) q[r].a[j]=1; x=2; x+=q[r].a[j]; } if (zt[x]==false) { q[r].v=x; q[r].t+

信息

递交者
类型
递交
题目
P1026 毒药?解药?
语言
C++
递交时间
2015-04-21 20:17:03
评测时间
2015-04-21 20:17:03
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes