自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

青山绿水之辈 专栏

成大事者,不惟有超世之才,亦有坚忍不拔之志。

  • 博客(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

代码行数统计工具

代码统计工具,在上面你可以选择一个代码文件夹,然后再进行代码统计,就可以知道你以前写过的所有代码,一共有多少行代码

2014-04-04

最短路Floyd算法

在计算有环有方向的最短路时,可以用Floyd算法计算出任意两点之间的最短路!

2014-04-04

刘汝佳的黑书

黑书对于每个编程人员来讲,都是有必要去看的,里面的很多算法都是非常的红典,从中可以学到很多我们在书本上学不到的东西!

2014-04-04

背包九讲算法

背包九讲里面讲述了九种不同的背包类型,对于想学背包的人来说,这是一个不错的选择!

2014-04-04

C++写程序时用到的库函数

C++库函数里面描术了很多函数的名字和相应的功能,在写程序时可以很方便的进行调用!

2014-04-04

汇编DOS-MASM615

汇编安装包:如果想写汇编程序时,先安装些包,然后就可以在DOS下编程

2014-04-04

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除