摘要:
题目描述 给定一棵有N个点的树,所有节点的权值都为0。 有K次操作,每次指定两个点s,t,将s到t路径上所有点的权值都加一。 请输出K次操作完毕后权值最大的那个点的权值。 输入格式 The first line of the input contains N and K. The next N 1 阅读全文
posted @ 2019-05-29 19:07
修电缆的建筑工
阅读(104)
评论(0)
推荐(0)
摘要:
题目描述 给出以1号点为根的一棵有根树,问每个点的子树中与它距离小于等于l的点有多少个。 输入格式 Line 1: 2 integers, N and L (1 include include include define maxn 200001 using namespace std; struc 阅读全文
posted @ 2019-05-29 18:57
修电缆的建筑工
阅读(180)
评论(0)
推荐(0)
摘要:
题目描述 我们的郭嘉大大在曹操这过得逍遥自在,但是有一天曹操给了他一个任务,在建邺城内有N( include include include define maxn 1001 using namespace std; vector to[maxn]; int dfn[maxn],low[maxn], 阅读全文
posted @ 2019-05-29 18:40
修电缆的建筑工
阅读(521)
评论(0)
推荐(0)