```
对于100%的数据:N<=500000,M<=500000
```
by yijan @ 2018-12-12 13:05:33
数据范围是5e5,不是1e5
by 142857cs @ 2018-12-12 13:14:29
> @[xsysteven060205](/space/show?uid=140034) 建议开 $\text{long long}$
by arfa @ 2018-12-12 13:30:37
@[142857cs](/space/show?uid=35760) 谢谢巨佬
by Naruto_steven @ 2018-12-12 13:41:55
@[arfa](/space/show?uid=77760) 谢谢巨佬
by Naruto_steven @ 2018-12-12 13:42:08
@[yijan](/space/show?uid=63398) 谢谢巨佬
by Naruto_steven @ 2018-12-12 13:42:17