/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void add(int)':
/in/foo.cc:107:36: error: 'g' was not declared in this scope
     set<int>::iterator it=s.insert(g->id[x]).first,it2=it;
                                    ^
/in/foo.cc:112:5: error: 'it2' was not declared in this scope
     it2++;
     ^~~
/in/foo.cc:123:19: error: 'v' was not declared in this scope
     ans-=g->dis(u,v);
                   ^
/in/foo.cc: In function 'void del(int)':
/in/foo.cc:128:34: error: 'g' was not declared in this scope
     set<int>::iterator it=s.find(g->id[x]),it2=it;
                                  ^
/in/foo.cc:134:5: error: 'it2' was not declared in this scope
     it2++;
     ^~~
/in/foo.cc:147:19: error: 'v' was not declared in this scope
     ans+=g->dis(u,v);
                   ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:171:43: error: request for member 'dfn' in 'g', which is of pointer type 'graph*' (maybe you meant to use '->' ?)
         else printf("%lld\n",ans+g->dis(g.dfn[*s.begin()],g.dfn[*s.rbegin()]));
                                           ^~~
/in/foo.cc:171:61: error: request for member 'dfn' in 'g', which is of pointer type 'graph*' (maybe you meant to use '->' ?)
         else printf("%lld\n",ans+g->dis(g.dfn[*s.begin()],g.dfn[*s.rbegin()]));
                                                             ^~~

信息

递交者
类型
自测
题目
P1946 寻宝游戏
语言
C++
递交时间
2018-02-28 22:54:35
评测时间
2018-02-28 22:54:35
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes