上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 26 下一页
  2015年10月15日
摘要: 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 阅读(194) 评论(0) 推荐(0) 编辑
  2015年10月14日
摘要: 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 阅读(401) 评论(0) 推荐(0) 编辑
  2015年10月13日
摘要: 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 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(289) 评论(0) 推荐(0) 编辑
  2015年10月11日
摘要: 题意:给出一棵树,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 阅读(186) 评论(0) 推荐(0) 编辑
  2015年10月10日
摘要: 一棵树,初始边权和点权都为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 阅读(237) 评论(0) 推荐(0) 编辑
  2015年10月6日
摘要: 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 阅读(203) 评论(0) 推荐(0) 编辑
  2015年10月3日
摘要: 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 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(237) 评论(0) 推荐(0) 编辑
  2015年9月28日
摘要: 离散化的大概思路:比如说给你一组数据141000100000,如果直接开线段,显然是浪费,那么我们只要进行映射:1142100031000004接下来我们只要对1234建立线段树就行了只需要[1,4]的区间离散化就相当于是先做映射,然后再建树。本题大意:给定一些海报,可能相互重叠,告诉你每个海报的宽... 阅读全文
posted @ 2015-09-28 16:02 _fukua 阅读(198) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 26 下一页