0_0_24132546_30591.cpp:7:21: error: 'a' does not name a type
using namespace std;a
^
0_0_24132546_30591.cpp: In function 'void add(int, int)':
0_0_24132546_30591.cpp:14:6: error: 'cnt' was not declared in this scope
E[++cnt] = (edge){head[u],v}; head[u] = cnt;
^
0_0_24132546_30591.cpp:14:20: error: 'head' was not declared in this scope
E[++cnt] = (edge){head[u],v}; head[u] = cnt;
^
0_0_24132546_30591.cpp: In function 'void Init()':
0_0_24132546_30591.cpp:20:2: error: 'cnt' was not declared in this scope
cnt = 0; memset(head,0,sizeof(head));
^
0_0_24132546_30591.cpp:20:18: error: 'head' was not declared in this scope
cnt = 0; memset(head,0,sizeof(head));
^
0_0_24132546_30591.cpp:21:2: error: 'ansx' was not declared in this scope
ansx = ansy = n + 1; memset(vis,0,sizeof(vis));
^
0_0_24132546_30591.cpp:21:9: error: 'ansy' was not declared in this scope
ansx = ansy = n + 1; memset(vis,0,sizeof(vis));
^
0_0_24132546_30591.cpp:21:16: error: 'n' was not declared in this scope
ansx = ansy = n + 1; memset(vis,0,sizeof(vis));
^
0_0_24132546_30591.cpp:21:30: error: 'vis' was not declared in this scope
ansx = ansy = n + 1; memset(vis,0,sizeof(vis));
^
0_0_24132546_30591.cpp:23:42: error: 'val' was not declared in this scope
for(int i = 1; i <= n; ++i) scanf("%d",&val[i]);
^
0_0_24132546_30591.cpp: In function 'void getroot(int, int)':
0_0_24132546_30591.cpp:30:14: error: 'head' was not declared in this scope
for(int i = head[u]; i; i = E[i].nxt)
^
0_0_24132546_30591.cpp:33:17: error: 'vis' was not declared in this scope
if(v == fa || vis[v]) continue;
^
0_0_24132546_30591.cpp:38:24: error: 'sz' was not declared in this scope
T[u].mx = max(T[u].mx,sz - T[u].size);
^
0_0_24132546_30591.cpp:39:17: error: 'rt' was not declared in this scope
if(T[u].mx < T[rt].mx) rt = u;
^
0_0_24132546_30591.cpp: In function 'void getdeep(int, int, int)':
0_0_24132546_30591.cpp:46:14: error: 'head' was not declared in this scope
for(int i = head[u]; i; i = E[i].nxt)
^
0_0_24132546_30591.cpp:49:6: error: 'vis' was not declared in this scope
if(vis[v] || v == fa) continue;
^
0_0_24132546_30591.cpp:50:23: error: 'val' was not declared in this scope
getdeep(v,u,1ll*dis*val[v]%mod);
^
0_0_24132546_30591.cpp: In function 'void div(int)':
0_0_24132546_30591.cpp:56:2: error: 'vis' was not declared in this scope
vis[u] = true; ai[1] = u;
^
0_0_24132546_30591.cpp:57:14: error: 'head' was not declared in this scope
for(int i = head[u]; i; i = E[i].nxt)
^
0_0_24132546_30591.cpp:61:24: error: 'val' was not declared in this scope
top = 0; getdeep(v,u,val[v]);
^
0_0_24132546_30591.cpp:65:15: error: 'K' was not declared in this scope
z = ai[1ll*K*inv[1ll*y*val[u]%mod]%mod];
^
0_0_24132546_30591.cpp:65:17: error: 'inv' was not declared in this scope
z = ai[1ll*K*inv[1ll*y*val[u]%mod]%mod];
^
0_0_24132546_30591.cpp:69:11: error: 'ansx' was not declared in this scope
if(x < ansx || (x == ansx && z < ansy)) ansx = x, ansy = z;
^
0_0_24132546_30591.cpp:69:37: error: 'ansy' was not declared in this scope
if(x < ansx || (x == ansx && z < ansy)) ansx = x, ansy = z;
^
0_0_24132546_30591.cpp:74:14: error: 'head' was not declared in this scope
for(int i = head[u]; i; i = E[i].nxt)
^
0_0_24132546_30591.cpp:78:24: error: 'val' was not declared in this scope
top = 0; getdeep(v,u,val[v]) ;
^
0_0_24132546_30591.cpp:82:14: error: 'head' was not declared in this scope
for(int i = head[u]; i; i = E[i].nxt)
^
0_0_24132546_30591.cpp:86:3: error: 'rt' was not declared in this scope
rt = 0; sz = T[v].size;
^
0_0_24132546_30591.cpp:86:11: error: 'sz' was not declared in this scope
rt = 0; sz = T[v].size;
^
0_0_24132546_30591.cpp: In function 'void Solve()':
0_0_24132546_30591.cpp:95:2: error: 'sz' was not declared in this scope
sz = n; rt = 0; getroot(1,0);
^
0_0_24132546_30591.cpp:95:7: error: 'n' was not declared in this scope
sz = n; rt = 0; getroot(1,0);
^
0_0_24132546_30591.cpp:95:10: error: 'rt' was not declared in this scope
sz = n; rt = 0; getroot(1,0);
^
0_0_24132546_30591.cpp:97:5: error: 'ansx' was not declared in this scope
if(ansx > n) puts("No solution");
^
0_0_24132546_30591.cpp:98:29: error: 'ansy' was not declared in this scope
else printf("%d %d\n",ansx,ansy);
^
0_0_24132546_30591.cpp: In function 'int main()':
0_0_24132546_30591.cpp:104:2: error: 'inv' was not declared in this scope
inv[1] = 1;
^
0_0_24132546_30591.cpp:106:23: error: 'n' was not declared in this scope
while(~scanf("%d%d",&n,&K))
^
0_0_24132546_30591.cpp:106:26: error: 'K' was not declared in this scope
while(~scanf("%d%d",&n,&K))
^
|