- 博客(8)
- 收藏
- 关注
原创 LCA——JD 3055 Nearest Common Ancestors (Tarjon做法(离线))
Nearest Common AncestorsTime Limit: 1 Sec Memory Limit: 128 MBDescription给定N个节点的一棵树,有K次查询,每次查询a和b的最近公共祖先。样例中的16和7的公共祖先(LCA:Least Common Ancestors)是4。Input第一行两个整数N(1 5)、K(1 5)第
2017-08-19 11:22:22 84
原创 树形Dp——扭一扭 poj 1655 Balancing Act
Balancing ActTime Limit: 1000MS Memory Limit: 65536KDescriptionConsider a tree T with N (1 <= N <= 20,000) nodes numbered 1...N. Deleting any node from the tree yields a fo
2017-08-18 19:01:35 106
原创 树形Dp——POJ 1463 Strategic game
Strategic gameTime Limit: 2000MS Memory Limit: 10000KDescriptionBob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fas
2017-08-15 17:21:49 103
原创 树形Dp——poj3342
Party at Hali-BulaTime Limit: 2000MS Memory Limit: 65536KDescriptionDear Contestant,I'm going to have a party at my villa at Hali-Bula to celebrate my retirement from B
2017-08-15 15:49:32 116
原创 JD 3108 牛数
3108: 牛数Time Limit: 1 Sec Memory Limit: 128 MBDescription我们下面来研究整数性质,我们知道质数只有1和自身两个因子,合数至少有除了1和自身的其他因子,我们也知道“猫老大数”是只能分解成两个质数乘积形式的数,那么能分解成两个合数的数呢?我们称之为“牛数”。下面编程判断整数是否为“牛数”。Input第一行为t
2017-08-14 11:25:03 222
原创 LCA——JD 3055 Nearest Common Ancestors
3055: Nearest Common AncestorsTime Limit: 1 Sec Memory Limit: 128 MBDescription给定N个节点的一棵树,有K次查询,每次查询a和b的最近公共祖先。样例中的16和7的公共祖先(LCA:Least Common Ancestors)是4。Input第一行两个整数N(1 5)、K(1
2017-08-14 09:55:27 153
原创 吉林省选 不重复数字
1970: [JLOI2011]不重复数字Time Limit: 1 Sec Memory Limit: 256 MBDescription给出N个数,要求把其中重复的去掉,只保留第一次出现的数。例如,给出的数为1 2 18 3 3 19 2 3 6 5 4,其中2和3有重复,去除后的结果为1 2 18 3 19 6 5 4。Input输入第一
2017-08-13 17:45:43 138
原创 树形Dp——poj2486 Apple Tree
Apple TreeTime Limit: 1000MS Memory Limit: 65536KDescriptionWshxzt is a lovely girl. She likes apple very much. One day HX takes her to an apple tree. There are N nodes in th
2017-08-13 10:02:12 146
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人