/in/foo.cc: In function 'void del(int)':
/in/foo.cc:137:16: error: request for member 'dis' in 'g', which is of pointer type 'graph*' (maybe you meant to use '->' ?)
ans-=g.dis(x,g->dfn[*it2]);
^~~
/in/foo.cc:143:16: error: request for member 'dis' in 'g', which is of pointer type 'graph*' (maybe you meant to use '->' ?)
ans-=g.dis(x,g->dfn[*it]);
^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:172: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:172: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()]));
^~~