/ Vijos /

记录详情

Compile Error

foo.cpp:1:1: error: 'include' does not name a type
 include<cstdio>
 ^
foo.cpp: In function 'int main()':
foo.cpp:6:25: error: 'stdin' was not declared in this scope
 freopen("link10.in","r",stdin);
                         ^
foo.cpp:6:30: error: 'freopen' was not declared in this scope
 freopen("link10.in","r",stdin);
                              ^
foo.cpp:7:13: error: 'n' was not declared in this scope
 scanf("%d",&n);
             ^
foo.cpp:7:14: error: 'scanf' was not declared in this scope
 scanf("%d",&n);
              ^
foo.cpp:12:5: error: 'path' was not declared in this scope
     path[i][0]=b;
     ^
foo.cpp:13:16: error: 'index' was not declared in this scope
     path[i][1]=index[a];
                ^
foo.cpp:21:34: error: 'w' was not declared in this scope
 for(i=1;i<=n;i++)    scanf("%d",&w[i]);    //读入每个点的权值 
                                  ^
foo.cpp:25:7: error: 'index' was not declared in this scope
     a=index[i];                            //初始化 
       ^
foo.cpp:30:11: error: 'path' was not declared in this scope
     while(path[a][0])                    //遍历与每个父亲节点相连的所有子节点 
           ^
foo.cpp:32:11: error: 'w' was not declared in this scope
         b=w[path[a][0]];                //读取当前子节点的权值 
           ^
foo.cpp:48:25: error: 'printf' was not declared in this scope
 printf("%d %d",max_t,w_t);                //输出结果 
                         ^
foo.cpp:5:7: warning: unused variable 'j' [-Wunused-variable]
 int i,j,a,b,k,sum,max_1,max_2,max_t=0,w_t=0;
       ^

信息

递交者
类型
递交
题目
P1906 联合权值
语言
C++
递交时间
2015-10-29 13:21:44
评测时间
2015-10-29 13:21:45
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes