自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 hdu 3973 字符串hash+线段树

http://acm.hdu.edu.cn/showproblem.php?pid=3973Problem DescriptionYou are given some words {Wi}. Then our stupid AC will give you a very long string S. AC is stupid and always wants to know w

2014-12-29 19:34:32 1189

原创 hdu 1496 hash+暴力

http://acm.hdu.edu.cn/showproblem.php?pid=1496Problem DescriptionConsider equations having the following form: a*x1^2+b*x2^2+c*x3^2+d*x4^2=0a, b, c, d are integers from the interval [-

2014-12-29 10:50:56 874

原创 poj1200 哈希

http://poj.org/problem?id=1200DescriptionMany people like to solve hard puzzles some of which may lead them to madness. One such puzzle could be finding a hidden prime number in a given text.

2014-12-29 10:01:26 2769

原创 poj 3274 哈希

http://poj.org/problem?id=3274DescriptionFarmer John's N cows (1 ≤ N ≤ 100,000) share many similarities. In fact, FJ has been able to narrow down the list of features shared by his cows to a l

2014-12-28 21:34:16 895

原创 LA 4513 hash表示字符串后缀

https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=2514&mosmsg=Submission+received+with+ID+1623942Dr. Ellie Arroway has established cont

2014-12-27 11:06:51 1246

原创 ACdreamOJ 1116 斐波那契数列+hash计算后缀

http://acdream.info/problem?pid=1116Problem Descriptiongive you a string, please output the result of the following function mod 1000000007n is the length of the stringf() is the funct

2014-12-26 21:01:14 1418

原创 AC dreamoj 1011 树状数组+hash维护字符串的前缀和

http://acdream.info/problem?pid=1019Problem DescriptionNow we have a long long string, and we will have two kinds of operation on it.C i y : change the ith letter to y.Q i j : check whet

2014-12-26 16:12:13 918

原创 哈希表的构建与查询

(本文内容来自互联网)11.2 哈希函数构造方法 设要存放的数据元素有n个,存放数据元素的数组个数为m,哈希函数的设计目标,就是要使通过哈希函数得到的n个数据元素的哈希地址 。    1 除留余数法           除留余数法是用数据元素的关键字K除以哈希表长度m所得的余数作为哈希地址的方法。除留余数法的哈希函数h(K)为:             h(K)

2014-12-22 17:29:41 1473

原创 hdu 5147 树状数组

http://acm.hdu.edu.cn/showproblem.php?pid=5147Problem DescriptionLong long ago, there is a sequence A with length n. All numbers in this sequence is no smaller than 1 and no bigger than n, a

2014-12-21 17:30:32 999

原创 hdu 5148 树形dp+分组背包问题

http://acm.hdu.edu.cn/showproblem.php?pid=5148Problem DescriptionLong long ago,there is a knight called JayYe.He lives in a small country.This country is made up of n cities connected by n-1

2014-12-21 10:21:10 1452

原创 hdu4003 树形dp+分组背包

http://acm.hdu.edu.cn/showproblem.php?pid=4003Problem DescriptionHumans have discovered a kind of new metal mineral on Mars which are distributed in point‐like with paths connecting each of

2014-12-20 21:06:29 862

原创 hdu1712 分组背包问题

问题有N件物品和一个容量为V的背包。第i件物品的费用是c[i],价值是w[i]。这些物品被划分为若干组,每组中的物品互相冲突,最多选一件。求解将哪些物品装入背包可使这些物品的费用总和不超过背包容量,且价值总和最大。算法这个问题变成了每组物品有若干种策略:是选择本组的某一件,还是一件都不选。也就是说设f[k][v]表示前k组物品花费费用v能取得的最大权值,则有:f[k][v]=max

2014-12-20 15:25:29 2118

原创 zoj3822||牡丹江现场赛D题 概率dp

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5376DominationTime Limit: 8 Seconds      Memory Limit: 131072 KB      Special JudgeEdward is the headmaster of Marjar Universit

2014-12-18 11:58:28 1089

原创 01背包的变形

http://poj.org/problem?id=3211DescriptionDearboy 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

2014-12-18 10:15:13 1004

原创 二叉查找树(二叉排序树)

二叉排序树的建立,查找,删除节点的操作。#include #include #include #include using namespace std;struct node{ int key;///结点值 node *left; node *right; node *parent;///指向父亲结点的指针};///递归中序遍历排序二叉树vo

2014-12-17 19:09:33 944

原创 哈理工校赛F题 递归分治

比赛时不会,在小岛的帮助下还是把这道题做出来了/** 汉语题我就不说题意了。思路:对于整这个区间,每次都找到最小的数,然后递归分治*/#include #include #include #include using namespace std;int n,a[100005];int get(int l,int r){ int minn=1e9+3; fo

2014-12-14 21:28:05 1364

原创 hdu5143 暴力枚举

http://acm.hdu.edu.cn/showproblem.php?pid=5143Problem DescriptionNPY is learning arithmetic progression in his math class. In mathematics, an arithmetic progression (AP) is a sequence of num

2014-12-14 20:17:09 1825

原创 hdu5144 物理+三分

http://acm.hdu.edu.cn/showproblem.php?pid=5144Problem DescriptionNPY is going to have a PE test.One of the test subjects is throwing the shot.The height of NPY is H meters.He can throw the s

2014-12-14 10:47:42 1087

原创 poj2400 KM算法二分图的完美匹配

http://poj.org/problem?id=2400DescriptionSuppose some supervisors each get to hire a new person for their department. There are N people to be placed in these N departments. Each supervisor in

2014-12-04 09:42:44 863

原创 hdu5137 最短路径最大化

http://acm.hdu.edu.cn/showproblem.php?pid=5137Problem Description"Guanxi" is a very important word in Chinese. It kind of means "relationship" or "contact". Guanxi can be based on friend

2014-12-03 20:48:39 1402

原创 hdu5135 状态压缩dp||2014广州站I题

http://acm.hdu.edu.cn/showproblem.php?pid=5135Problem DescriptionZu Chongzhi (429–500) was a prominent Chinese mathematician and astronomer during the Liu Song and Southern Qi Dynasties. Zu

2014-12-03 20:42:24 849

原创 poj1976 dp

http://poj.org/problem?id=1976DescriptionA train has a locomotive that pulls the train with its many passenger coaches. If the locomotive breaks down, there is no way to pull the train. Theref

2014-12-03 20:32:00 608

原创 poj1745 dp

http://poj.org/problem?id=1745DescriptionConsider an arbitrary sequence of integers. One can place + or - operators between integers in the sequence, thus deriving different arithmetical expre

2014-12-03 20:27:52 674

原创 KM算法——二分图的最佳匹配

/***************************************************************************************************************************************************KM算法模板C++作用: 求二分图的最佳匹配注意: (1)for (i:1

2014-12-03 20:24:33 1228

原创 hdu2255 二分图的最佳匹配 KM算法

http://acm.hdu.edu.cn/showproblem.php?pid=2255Problem Description传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子住的话,容易引起不安定因素),每家必须分配到一间

2014-12-03 20:20:45 608

原创 poj2923 01背包+状态压缩dp

http://poj.org/problem?id=2923DescriptionEmma and Eric are moving to their new house they bought after returning from their honeymoon. Fortunately, they have a few friends helping them relocat

2014-12-01 21:30:59 642

原创 hdu4472 递推

http://acm.hdu.edu.cn/showproblem.php?pid=4472Problem DescriptionProf. Tigris is the head of an archaeological team who is currently in charge of an excavation in a site of ancient relics.

2014-12-01 20:16:14 598

原创 hdu4474 bfs

http://acm.hdu.edu.cn/showproblem.php?pid=4474Problem DescriptionThere are tons of problems about integer multiples. Despite the fact that the topic is not original, the content is highl

2014-12-01 16:47:53 891

空空如也

空空如也

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

TA关注的人

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