10 2015 档案
CF534A Exam 构造
摘要:An exam fornstudents will take place in a long and narrow room, so the students will sit in a line in some order. The teacher suspects that students w... 阅读全文
posted @ 2015-10-17 00:07 _fukua 阅读(304) 评论(0) 推荐(0)
SPOJ Query on a tree 树链剖分 水题
摘要:You are given a tree (an acyclic undirected connected graph) withNnodes, and edges numbered 1, 2, 3...N-1.We will ask you to perfrom some instructions... 阅读全文
posted @ 2015-10-15 18:47 _fukua 阅读(215) 评论(0) 推荐(0)
CF109 C. Lucky Tree 并查集
摘要:Petya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations contain only the lucky digits4and7. ... 阅读全文
posted @ 2015-10-14 17:58 _fukua 阅读(434) 评论(0) 推荐(0)
CF 191C Fools and Roads lca 或者 树链剖分
摘要:They say that Berland has exactly two problems, fools and roads. Besides, Berland hasncities, populated by the fools and connected by the roads. All B... 阅读全文
posted @ 2015-10-13 13:18 _fukua 阅读(462) 评论(0) 推荐(0)
CF 486D vailid set 树形DP
摘要:As you know, an undirected connected graph withnnodes andn - 1edges is called atree. You are given an integerdand a tree consisting ofnnodes. Each nod... 阅读全文
posted @ 2015-10-13 12:23 _fukua 阅读(310) 评论(0) 推荐(0)
HDU5221 Occupation 树链剖分
摘要:题意:给出一棵树,root=1,树有点权,有一个人叫做M有3种操作:1 u v 把u到v路径上的所有点的点权都给M2 u 若u的点权在M手上,拿走3 u 把u为根的子树的所有点权都给M每一个操作过后,输出M拥有的点权想法:要维护路径,用树链剖分要维护子树,用dfs序但是这样貌似要写很多然而后来知道树... 阅读全文
posted @ 2015-10-11 10:40 _fukua 阅读(212) 评论(0) 推荐(0)
HDU 5044 Tree 树链剖分
摘要:一棵树,初始边权和点权都为0现在有m个操作,每一个操作:ADD1 u v k: for nodes on the path from u to v, the value of these nodes increase by k.ADD2 u v k: for edges on the path fr... 阅读全文
posted @ 2015-10-10 19:46 _fukua 阅读(263) 评论(0) 推荐(0)
hdu 5288 OO’s Sequence 枚举+二分
摘要:Problem DescriptionOO has got a array A of size n ,defined a function f(l,r) represent the number of i (li) satisfy aimod aj=0,now OO want to know∑i=1... 阅读全文
posted @ 2015-10-06 01:35 _fukua 阅读(221) 评论(0) 推荐(0)
CF 518 D. Ilya and Escalator
摘要:Ilya got tired of sports programming, left university and got a job in the subway. He was given the task to determine the escalator load factor.Let's ... 阅读全文
posted @ 2015-10-03 15:35 _fukua 阅读(268) 评论(0) 推荐(0)
CF478 B. Random Teams 组合数学 简单题
摘要:nparticipants of the competition were split intomteams in some manner so that each team has at least one participant. After the competition each pair ... 阅读全文
posted @ 2015-10-03 00:03 _fukua 阅读(272) 评论(0) 推荐(0)