摘要:
来源:https://ac.nowcoder.com/acm/contest/22131/C 时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld 题目描述 给出一个n个点的树,1号节点为根节点,每个点有一个权 阅读全文
posted @ 2021-10-31 12:13
Lotus3th
阅读(59)
评论(0)
推荐(0)
摘要:
相比两个点的距离相加等于k, 等于k的倍数而言 这题稍微转换一下思路即可 利用容斥原理去掉重复计算的点对 点击查看代码 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namesp 阅读全文
posted @ 2021-10-31 06:24
Lotus3th
阅读(25)
评论(0)
推荐(0)

浙公网安备 33010602011771号