```cpp
struct edge{
int next,to,w;
}a[600010];
```
by huangzirui @ 2019-11-14 16:32:15
能用吧qwq
by Pisces @ 2019-11-14 16:32:55
@[huangzirui](/user/35891) C?
反正C++里面是要C++11的
by MZW_BG @ 2019-11-14 16:40:26
我一般打
```
void ins(int x,int y,int c)
{
a[++len]=(edge){y,c,last[x]};
last[x]=len;
}
```
多加个括号
by MZW_BG @ 2019-11-14 16:41:33
@[Pisces](/user/48057) @[MZW_BG](/user/97504) 谢谢QwQ
by huangzirui @ 2019-11-14 16:42:15
@[huangzirui](/user/35891) next好像是关键字
by Absurdity @ 2019-11-14 16:44:38
QAQOrz
by 失之_连心 @ 2019-11-14 19:09:29