- 博客(18)
- 资源 (6)
- 问答 (1)
- 收藏
- 关注
原创 hrbust简单操作
Description 有一个空集合,集合内部的元素是一个 pair 。五种操作: 1、ADD新添一个元素 pair 保证元素的A 都不相等 Add A B 2、INC代表所有元素的A和X异或的结果在[L , R]范围内的元素的 B都要加上 C。 注意:这个操作是瞬间的,后来新加入的元素是不会被这个操作作用。
2014-03-30 16:45:05 1333
原创 hrbust真•找规律
Description 传说大家最喜欢找规律了是不是。 ^_^ 参见附表,表中都是5位数,他们有很强烈的规律性呦~当然他们肯定不止这么多。 请找出所有符合这样规律的五位数(不含前导0,比如不能是00000),从小到大将他们全部输出。 下表是 30个具有规律性的数字。 48032 34012 77749 48932 48732 243
2014-03-30 16:42:32 1479
原创 Hrbust 囧(输出图像囧)
Description DS最近很囧,总是不能把妹子哄开心。所以,邪恶的他也想让你们囧一囧。 他给你一个数字 n 让你输出囧字的迭代(详见样例)。 Input 第一行一个整数,代表数据的组数。 每组数据一个整数 n(1≤n≤7) Output 每组数据输出一个囧字的图形. Sa
2014-03-30 16:19:55 2020
原创 hdu1520Anniversary party (树形DP)
Problem Description There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of employees. It means that the superviso
2014-03-26 21:19:27 1026
原创 POJ1655Balancing Act(树形DP)
Description Consider a tree T with N (1 <= N <= 20,000) nodes numbered 1...N. Deleting any node from the tree yields a forest: a collection of one or more trees. Define the balance of a node to be
2014-03-26 18:13:12 1082
原创 poj2923Relocation(01背包+状态压缩)
Description Emma and Eric are moving to their new house they bought after returning from their honeymoon. Fortunately, they have a few friends helping them relocate. To move the furniture, they onl
2014-03-25 22:35:23 1107
原创 HDU1561The more, The Better (树形DP)
Problem Description ACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因,有些城堡不能直接攻克,要攻克这些城堡必须先攻克其他某一个特定的城堡。你能帮ACboy算出要获得尽量多的宝物应该攻克哪M个城堡吗? Input 每个测试实例首先包括2个整数,N,M.(1
2014-03-24 21:24:47 1008
原创 POJ1155TELE (树形DP)
Description A TV-network plans to broadcast an important football match. Their network of transmitters and users can be represented as a tree. The root of the tree is a transmitter that emits the f
2014-03-24 20:29:58 1116
原创 hdu4003&&蓝桥杯, 算法提高 金属采集 (树形DP,经典。。。)
问题描述 人类在火星上发现了一种新的金属!这些金属分布在一些奇怪的地方,不妨叫它节点好了。一些节点之间有道路相连,所有的节点和道路形成了一棵树。一共有 n 个节点,这些节点被编号为 1~n 。人类将 k 个机器人送上了火星,目的是采集这些金属。这些机器人都被送到了一个指定的着落点, S 号节点。每个机器人在着落之后,必须沿着道路行走。当机器人到达一个节点时,它会采集这个节点蕴藏的所有金属
2014-03-19 22:18:16 3421
原创 poj1947Rebuilding Roads(树形DP,经典。。。。)
Description The cows have reconstructed Farmer John's farm, with its N barns (1 <= N <= 150, number 1..N) after the terrible earthquake last May. The cows didn't have time to rebuild any extra road
2014-03-19 21:08:25 1214 1
原创 蓝桥杯, 算法训练 最短路 (SPFA)
问题描述 给定一个n个顶点,m条边的有向图(其中某些边权可能为负,但保证没有负环)。请你计算从1号点到其他点的最短路(顶点从1到n编号)。 输入格式 第一行两个整数n, m。 接下来的m行,每行有三个整数u, v, l,表示u到v有一条长度为l的边。 输出格式 共n-1行,第i行表示1号点到i+1号点的最短路。 样例输入 3 3 1
2014-03-15 18:58:35 1585
原创 蓝桥杯,算法训练 结点选择(简箪的树形DP)
问题描述 有一棵 n 个节点的树,树上每个节点都有一个正整数权值。如果一个点被选择了,那么在树上和它相邻的点都不能被选择。求选出的点的权值和最大是多少? 输入格式 第一行包含一个整数 n 。 接下来的一行包含 n 个正整数,第 i 个正整数代表点 i 的权值。 接下来一共 n-1 行,每行描述树上的一条边。 输出格式 输出一个整数,代表选出
2014-03-15 18:29:45 1733
原创 poj2486 Apple Tree(树形DP,有反回的情况,求最大)........很典型
Description Wshxzt is a lovely girl. She likes apple very much. One day HX takes her to an apple tree. There are N nodes in the tree. Each node has an amount of apples. Wshxzt starts her happy trip
2014-03-14 00:16:16 1380
原创 hdu2412Party at Hali-Bula (树形DP+记录是否唯一)
Problem Description Dear Contestant, I'm going to have a party at my villa at Hali-Bula to celebrate my retirement from BCM. I wish I could invite all my co-workers, but imagine how an employee ca
2014-03-10 19:22:12 907
原创 hdu1054Strategic Game(树形DP)
Problem Description Bob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is very sad. Now he has the following problem. He
2014-03-09 21:28:48 1024
原创 hdu1011Starship Troopers (树形DP)
Problem Description You, the leader of Starship Troopers, are sent to destroy a base of the bugs. The base is built underground. It is actually a huge cavern, which consists of many rooms connected w
2014-03-08 15:03:34 1134
原创 poj3211Washing Clothes(分成多组01背包) .......经典
Description Dearboy was so busy recently that now he has piles of clothes to wash. Luckily, he has a beautiful and hard-working girlfriend to help him. The clothes are in varieties of colors but ea
2014-03-06 20:01:34 1062
原创 hdu3535AreYouBusy (分组背包,WA了很多次)
Problem Description Happy New Term! As having become a junior, xiaoA recognizes that there is not much time for her to AC problems, because there are some other things for her to do, which makes her
2014-03-01 20:55:36 1400
TA创建的收藏夹 TA关注的收藏夹
TA关注的人