自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 HDU 3732 Ahui Writes Word 经典动态规划 DP

直接 DP 的话肯定超时因为每个单词的 Complex 和 Value 都不会超过 10 所以里面肯定存在大量的相同价值的物品将相同价值的物品合并后用多重背包解之即可#include #include #include #include #include #include #include #include #include #include #include

2014-04-20 23:25:19 444

原创 HDU 3926 Hand in Hand 并查集

求图的同构因为只有两个度,所以每个图的联通分

2014-04-20 09:00:22 410

原创 HDU 携程编程大赛 1003 携程全球数据中心建设 水题

开始还没想到居然,囧!先老老实实的转换,再ba

2014-04-10 21:49:09 624

原创 HDU 携程编程大赛 1003 携程全球数据中心建设 Prim OR Kruskal

水题先求两两jia#include #include #include #include #include #include #include #include #include #include #include #include #define BUG puts("HERE!")using namespace std;const int MAX = 105;

2014-04-10 21:46:04 545

原创 HDU 4287 Intelligent IME 水题

本想写个字典树结果发现是个水题。。#include #include #include #include #include #include using namespace std;const int MAX = 1000000 + 5;int num[MAX], val[MAX];const int mp[] = {2, 2, 2, 3, 3, 3, 4, 4, 4,

2014-04-05 16:38:54 578

原创 HDU 4217 Data Structure? 线段树 OR 树状数组

受不了了,下次记得把左边的减掉了再查右边和

2014-04-05 16:05:37 477

原创 HDU 4602 Partition 数论 AND 快速幂

一看数据范围就是推公式的题目虽然还无法整

2014-04-05 14:02:52 475

原创 HDU 1811 Rank of Tetris 拓扑排序 AND 并查集

先用并查集把相等的情况合并了再使用拓扑排序找冲突具体是用大的数向小的数建边,然后判断冲突#include #include #include #include #include #include #include #include using namespace std;const int MAX = 10005;const int MAXM = 20005;in

2014-04-03 20:58:01 422

原创 HDU 1598 Find the most comfortable road 二分枚举答案 或 并查集

我是用的二分,这样似乎要慢点并查集的那个没写。。窝真的好菜。。#include #include #include #include #include #include #include using namespace std;const int MAX = 205;const int MAXM = 1005;int spd[MAXM];bool vis[MAX]

2014-04-03 19:37:07 374

空空如也

空空如也

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

TA关注的人

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