/ Vijos /

记录详情

Compile Error

foo.cc: In function 'void Addedge(int, int, int)':
foo.cc:31:2: error: 'id' was not declared in this scope
  id++;set[id].v=v;set[id].w=w;set[id].nx=head[u];
  ^~
foo.cc: In function 'void tree_dp2(int, int)':
foo.cc:49:7: error: 'k' was not declared in this scope
  for (k=head[u];k>0;k=set[k].nx)
       ^
foo.cc: In function 'void record(int, int)':
foo.cc:61:8: warning: statement has no effect [-Wunused-value]
  for (u!=f[v];u=f[u]) outree.set(u),path[cont[u]=++cnt]=u,g[f[u]]=u;
       ~^~~~~~
foo.cc:61:16: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  for (u!=f[v];u=f[u]) outree.set(u),path[cont[u]=++cnt]=u,g[f[u]]=u;
               ~^~~~~
foo.cc:61:21: error: expected ';' before ')' token
  for (u!=f[v];u=f[u]) outree.set(u),path[cont[u]=++cnt]=u,g[f[u]]=u;
                     ^
foo.cc:61:42: error: 'cont' was not declared in this scope
  for (u!=f[v];u=f[u]) outree.set(u),path[cont[u]=++cnt]=u,g[f[u]]=u;
                                          ^~~~
foo.cc:61:42: note: suggested alternative: 'cnt'
  for (u!=f[v];u=f[u]) outree.set(u),path[cont[u]=++cnt]=u,g[f[u]]=u;
                                          ^~~~
                                          cnt
foo.cc: In function 'void dfs(int, int)':
foo.cc:73:27: error: 'disl' was not declared in this scope
    if (!outree[set[k].v]) disl[cont[u]]=disr[cont[set[k].v]]=set[k].w;
                           ^~~~
foo.cc:73:27: note: suggested alternative: 'dfs'
    if (!outree[set[k].v]) disl[cont[u]]=disr[cont[set[k].v]]=set[k].w;
                           ^~~~
                           dfs
foo.cc:73:32: error: 'cont' was not declared in this scope
    if (!outree[set[k].v]) disl[cont[u]]=disr[cont[set[k].v]]=set[k].w;
                                ^~~~
foo.cc:73:32: note: suggested alternative: 'cnt'
    if (!outree[set[k].v]) disl[cont[u]]=disr[cont[set[k].v]]=set[k].w;
                                ^~~~
                                cnt
foo.cc:73:41: error: 'disr' was not declared in this scope
    if (!outree[set[k].v]) disl[cont[u]]=disr[cont[set[k].v]]=set[k].w;
                                         ^~~~
foo.cc:73:41: note: suggested alternative: 'dfs'
    if (!outree[set[k].v]) disl[cont[u]]=disr[cont[set[k].v]]=set[k].w;
                                         ^~~~
                                         dfs
foo.cc: In function 'void work()':
foo.cc:88:33: error: 'disl' was not declared in this scope
    if (f[v]==path[i]) up[u]+=p*(disl[cont[v]]+down[v]);
                                 ^~~~
foo.cc:88:33: note: suggested alternative: 'dfs'
    if (f[v]==path[i]) up[u]+=p*(disl[cont[v]]+down[v]);
                                 ^~~~
                                 dfs
foo.cc:88:38: error: 'cont' was not declared in this scope
    if (f[v]==path[i]) up[u]+=p*(disl[cont[v]]+down[v]);
                                      ^~~~
foo.cc:88:38: note: suggested alternative: 'cnt'
    if (f[v]==path[i]) up[u]+=p*(disl[cont[v]]+down[v]);
                                      ^~~~
                                      cnt
foo.cc:89:45: error: 'disl' was not declared in this scope
    else up[u]+=p*(down[v]*son[v]/(son[v]+1)+disl[cont[v]]);
                                             ^~~~
foo.cc:89:45: note: suggested alternative: 'dfs'
    else up[u]+=p*(down[v]*son[v]/(son[v]+1)+disl[cont[v]]);
                                             ^~~~
                                             dfs
foo.cc:89:50: error: 'cont' was not declared in this scope
    else up[u]+=p*(down[v]*son[v]/(son[v]+1)+disl[cont[v]]);
                                                  ^~~~
foo.cc:89:50: note: suggested alternative: 'cnt'
    else up[u]+=p*(down[v]*son[v]/(son[v]+1)+disl[cont[v]]);
                                                  ^~~~
                                                  cnt
foo.cc:95:33: error: 'disr' was not declared in this scope
    if (g[v]==path[i]) up[u]+=p*(disr[cont[v]]+down[v]);
                                 ^~~~
foo.cc:95:33: note: suggested alternative: 'dfs'
    if (g[v]==path[i]) up[u]+=p*(disr[cont[v]]+down[v]);
                                 ^~~~
                                 dfs
foo.cc:95:38: error: 'cont' was not declared in this scope
    if (g[v]==path[i]) up[u]+=p*(disr[cont[v]]+down[v]);
                                      ^~~~
foo.cc:95:38: note: suggested alternative: 'cnt'
    if (g[v]==path[i]) up[u]+=p*(disr[cont[v]]+down[v]);
                                      ^~~~
                                      cnt
foo.cc:96:45: error: 'disr' was not declared in this scope
    else up[u]+=p*(down[v]*son[v]/(son[v]+1)+disr[cont[v]]);
                                             ^~~~
foo.cc:96:45: note: suggested alternative: 'dfs'
    else up[u]+=p*(down[v]*son[v]/(son[v]+1)+disr[cont[v]]);
                                             ^~~~
                                             dfs
foo.cc:96:50: error: 'cont' was not declared in this scope
    else up[u]+=p*(down[v]*son[v]/(son[v]+1)+disr[cont[v]]);
                                                  ^~~~
foo.cc:96:50: note: suggested alternative: 'cnt'
    else up[u]+=p*(down[v]*son[v]/(son[v]+1)+disr[cont[v]]);
                                                  ^~~~
                                                  cnt
foo.cc: In function 'int main()':
foo.cc:109:31: error: 'w' was not declared in this scope
   u=read<int>();v=read<int>();w=read<int>();
                               ^

自豪的采用 HydroJudge 进行评测(github.com/hydro-dev/HydroJudge)

信息

递交者
类型
递交
题目
P1807 迷失游乐园
语言
C++
递交时间
2020-07-21 17:40:38
评测时间
2020-07-21 17:40:38
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes