
DFS
kaisa158
HIT、机器学习
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
bzoj 2783 树(dfs 前缀和 邻接表)(中等)
【bzoj2783】[JLOI2012]树 Description 第一行是两个整数N和S,其中N是树的节点数。 第二行是N个正整数,第i个整数表示节点i的正整数。 接下来的N-1行每行是2个整数x和y,表示y是x的儿子。 输出格式: 输出路径节点总和为S的路径数量。 输入样例: 输出样例: 3 3 1转载 2015-08-05 16:17:03 · 582 阅读 · 0 评论 -
(DFS/并查集)Codeforces Round #479 (Div. 3) E. Cyclic Components
E. Cyclic Componentstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an undirected graph consisting of nn vertices and mm edges. Your...原创 2018-05-28 17:55:03 · 189 阅读 · 0 评论