"LINK" 思路 首先发现依赖关系是一个树形的结构 然后因为直接算花多少钱来统计贡献不是很好 因为数组开不下 那就可以算一个子树里面选多少个的最小代价就可以了 注意统计贡献的时候用优惠券的答案只能在1号点进行统计 c++ //Author: dream_maker include using na ...
分类:
其他好文 时间:
2018-10-09 15:02:58
阅读次数:
155
“少壮不努力,AK IOI。”—— "RLD" 2018/8/10 "Prime Distance On Tree" 和 "聪聪可可" 一样是点分治的计数题 但是合并信息是$ O( n ^ 2 ) $的,会炸,FFT可以加速。 2018/8/13 tset49 T1 还以为是polya定理,结果还是 ...
分类:
系统相关 时间:
2018-10-04 10:09:33
阅读次数:
350
一 HTML基本用法 <html> <head> <title>网页标题</title> </head> <body> 网页内容 </body> </html> 1.1基本标记 <html>...</html> 开始与结束标识 <head>...</head> 头标识 <title>...</tit ...
分类:
其他好文 时间:
2018-10-03 20:43:17
阅读次数:
134
The high level of English is a standard for a top student. 1. It's never too late to set another goal or to dream a new dream. 2. Ask not what your co ...
分类:
其他好文 时间:
2018-10-01 23:15:05
阅读次数:
235
Every cow's dream is to become the most popular cow in the herd. In a herd of N (1 <= N <= 10,000) cows, you are given up to M (1 <= M <= 50,000) orde ...
分类:
其他好文 时间:
2018-09-25 17:26:29
阅读次数:
188
for循环主要用于循环取值 student=【'summer','dream','cold'】 i=0 while i <len(students): print (student[1]) i+=1 for item in student: print(item) for item in 'hell ...
分类:
其他好文 时间:
2018-09-14 23:09:06
阅读次数:
165
解题思路:给定素数p,定义p内封闭的加法和乘法运算(运算封闭的定义:若从某个非空数集中任选两个元素(同一元素可重复选出),选出的这两个元素通过某种(或几种)运算后的得数仍是该数集中的元素,那么,就说该集合对于这种(或几种)运算是封闭的。),使得等式恒成立。 由费马小定理可得,∴,则。 ∴在模p的意义 ...
分类:
其他好文 时间:
2018-09-10 10:59:31
阅读次数:
174
Description Every cow's dream is to become the most popular cow in the herd. In a herd of N (1 <= N <= 10,000) cows, you are given up to M (1 <= M <= ...
分类:
其他好文 时间:
2018-09-09 18:16:17
阅读次数:
216
Travel PP loves travel. Her dream is to travel around country A which consists of N cities and M roads connecting them. PP has measured the money each ...
分类:
其他好文 时间:
2018-09-08 22:36:31
阅读次数:
163
Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 40304 Accepted: 16412 Description Every cow's dream is to become the most popular cow in th ...
分类:
其他好文 时间:
2018-09-07 01:06:06
阅读次数:
194