
题
pcccc0616
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
蒜头君的树
蒜头君的树题解 先存图,再dfs,dfs的过程中统计以x点为子树的点的总数cnt[x],这样可以求出来x和fa[x]连的这条边一共被使用了(n-cnt[x])*cnt[x]次 再求出来最短路之和tot(因为是树,所以最短路好求),对于每次修改,只需要将将差乘上使用次数就好了 #include<iostream> #include<cstdio> using namespace std; l原创 2017-07-31 17:29:07 · 576 阅读 · 0 评论 -
AtCoder Grand Contest 018
A - Getting Difference Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement There is a box containing N balls. The i-th ball has the integer Ai written on it. Sn原创 2017-07-24 07:47:43 · 334 阅读 · 0 评论 -
spfa+位运算 2017.10.9 t3
#include<iostream> #include<cstdio> #include<queue> #define Maxn (1<<20)+200005 #define Maxm 400001 using namespace std; int n,m,to[Maxn],nxt[Maxn],head[Maxn],e,val[Maxn],a[Maxm],x,y,dis[Maxn]; bool us原创 2017-10-10 08:25:30 · 229 阅读 · 0 评论