/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void dfs(int, int)':
foo.cpp:3:13: error: 'now' was not declared in this scope
  for (int y=now[x];y;y=pre[y]) if (son[y]!=fa) dfs(son[y],x),cnt++;
             ^
foo.cpp:3:24: error: 'pre' was not declared in this scope
  for (int y=now[x];y;y=pre[y]) if (son[y]!=fa) dfs(son[y],x),cnt++;
                        ^
foo.cpp:3:36: error: 'son' was not declared in this scope
  for (int y=now[x];y;y=pre[y]) if (son[y]!=fa) dfs(son[y],x),cnt++;
                                    ^
foo.cpp:4:18: error: 'lim' was not declared in this scope
  for (int i=0;i<=lim;i++) f[x][i][0]=1;
                  ^
foo.cpp:4:27: error: 'f' was not declared in this scope
  for (int i=0;i<=lim;i++) f[x][i][0]=1;
                           ^
foo.cpp:6:24: error: 'pre' was not declared in this scope
  for (int y=now[x];y;y=pre[y]) if (son[y]!=fa){
                        ^
foo.cpp:6:36: error: 'son' was not declared in this scope
  for (int y=now[x];y;y=pre[y]) if (son[y]!=fa){
                                    ^
foo.cpp:8:19: error: 'lim' was not declared in this scope
   for (int j=0;j<=lim;j++){
                   ^
foo.cpp:9:4: error: 'll' was not declared in this scope
    ll t,f1=!j?0:f[v][j-1][0]+f[v][j-1][1]+f[v][j-1][2],f2=f[v][j][0]+f[v][j][1];//f1??????????f2???????? 
    ^
foo.cpp:9:7: error: expected ';' before 't'
    ll t,f1=!j?0:f[v][j-1][0]+f[v][j-1][1]+f[v][j-1][2],f2=f[v][j][0]+f[v][j][1];//f1??????????f2???????? 
       ^
foo.cpp:10:4: error: 't' was not declared in this scope
    t=(ll)f[x][j][2]*f1+(ll)f[x][j][1]*f2;f[x][j][2]=get(t);
    ^
foo.cpp:10:10: error: expected ';' before 'f'
    t=(ll)f[x][j][2]*f1+(ll)f[x][j][1]*f2;f[x][j][2]=get(t);
          ^
foo.cpp:10:42: error: 'f' was not declared in this scope
    t=(ll)f[x][j][2]*f1+(ll)f[x][j][1]*f2;f[x][j][2]=get(t);
                                          ^
foo.cpp:10:58: error: 'get' was not declared in this scope
    t=(ll)f[x][j][2]*f1+(ll)f[x][j][1]*f2;f[x][j][2]=get(t);
                                                          ^
foo.cpp:11:10: error: expected ';' before 'f'
    t=(ll)f[x][j][1]*f1+(ll)f[x][j][0]*f2;f[x][j][1]=get(t);
          ^
foo.cpp:12:10: error: expected ';' before 'f'
    t=(ll)f[x][j][0]*f1;f[x][j][0]=get(t);
          ^
foo.cpp:7:7: warning: unused variable 'v' [-Wunused-variable]
   int v=son[y];
       ^
foo.cpp: In function 'int main()':
foo.cpp:18:18: error: 'n' was not declared in this scope
  scanf("%d%d%d",&n,&m,&Q);
                  ^
foo.cpp:18:21: error: 'm' was not declared in this scope
  scanf("%d%d%d",&n,&m,&Q);
                     ^
foo.cpp:18:24: error: 'Q' was not declared in this scope
  scanf("%d%d%d",&n,&m,&Q);
                        ^
foo.cpp:18:25: error: 'scanf' was not declared in this scope
  scanf("%d%d%d",&n,&m,&Q);
                         ^
foo.cpp:19:56: error: 'add' was not declared in this scope
  for (int i=1,a,b;i<=m;i++) scanf("%d%d",&a,&b),add(a,b),add(b,a);
                                                        ^
foo.cpp:20:26: error: 'puts' was not declared in this scope
  if (m<n-1){puts("-1\n-1");return 0;}
                          ^
foo.cpp:21:11: error: 'll' was not declared in this scope
  dfs(1,0);ll sum;
           ^
foo.cpp:21:14: error: expected ';' before 'sum'
  dfs(1,0);ll sum;
              ^
foo.cpp:22:18: error: 'lim' was not declared in this scope
  for (int i=0;i<=lim;i++) if (sum=f[1][i][0]+f[1][i][1]+f[1][i][2]) return printf("%d\n%d\n",i,(int)sum%Q),0;
                  ^
foo.cpp:22:31: error: 'sum' was not declared in this scope
  for (int i=0;i<=lim;i++) if (sum=f[1][i][0]+f[1][i][1]+f[1][i][2]) return printf("%d\n%d\n",i,(int)sum%Q),0;
                               ^
foo.cpp:22:35: error: 'f' was not declared in this scope
  for (int i=0;i<=lim;i++) if (sum=f[1][i][0]+f[1][i][1]+f[1][i][2]) return printf("%d\n%d\n",i,(int)sum%Q),0;
                                   ^
foo.cpp:22:106: error: 'printf' was not declared in this scope
  for (int i=0;i<=lim;i++) if (su

信息

递交者
类型
递交
题目
P1824 设计路线
语言
C++
递交时间
2016-07-25 15:16:07
评测时间
2016-07-25 15:16:08
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes