自定义博客皮肤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)
  • 收藏
  • 关注

原创 HDU2841 一个关于互质的容斥

Description There are many trees forming a m * n grid, the grid starts from (1,1). Farmer Sherlock is standing at (0,0) point. He wonders how many trees he can see. If two trees and Sherlock are in on

2016-08-30 15:30:20 449

原创 HDU1796 简单容斥

Description Now you get a number N, and a M-integers set, you should find out how many integers which are small than N, that they can divided exactly by any integers in the set. For example, N=12, a

2016-08-30 09:42:06 424

原创 POJ1091 简单的欧几里得+简单的容斥

DescriptionZ城市居住着很多只跳蚤。在Z城市周六生活频道有一个娱乐节目。一只跳蚤将被请上一个高空钢丝的正中央。钢丝很长,可以看作是无限长。节目主持人会给该跳蚤发一张卡片。卡片上写有N+1个自然数。其中最后一个是M,而前N个数都不超过M,卡片上允许有相同的数字。跳蚤每次可以从卡片上任意选择一个自然数S,然后向左,或向右跳S个单位长度。而他最终的任务是跳到距离他左边一个单位长度的地方,并捡起位

2016-08-28 13:09:54 1376 2

原创 HDU2204 第一道...超级水的容斥

DescriptionIgnatius 喜欢收集蝴蝶标本和邮票,但是Eddy的爱好很特别,他对数字比较感兴趣,他曾经一度沉迷于素数,而现在他对于一些新的特殊数比较有兴趣。 这些特殊数是这样的:这些数都能表示成M^K,M和K是正整数且K>1。 正当他再度沉迷的时候,他发现不知道什么时候才能知道这样的数字的数量,因此他又求助于你这位聪明的程序员,请你帮他用程序解决这个问题。 为了简化,

2016-08-25 19:39:56 757

原创 HDU3001 三进制的状压dp

Problem DescriptionAfter coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decided to visit n cities(he insists on seeing all the cities!And he does not min

2016-08-22 12:33:12 408

原创 HDU1074 状压dp

Problem DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in the

2016-08-18 01:36:10 256

原创 POJ3666 离散化的dp

DescriptionA straight dirt road connects two fields on FJ’s farm, but it changes elevation more than FJ would like. His cows do not mind climbing up or down a single slope, but they are not fond of an

2016-08-16 23:37:28 451

原创 HDU1078 dfs+dp

DescriptionFatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At each grid loca

2016-08-12 11:20:06 301

原创 POJ1661 神坑卧槽!!

Description“Help Jimmy” 是在下图所示的场景上完成的游戏。 场景中包括多个长度和高度各不相同的平台。地面是最低的平台,高度为零,长度无限。 Jimmy老鼠在时刻0从高于所有平台的某处开始下落,它的下落速度始终为1米/秒。当Jimmy落到某个平台上时,游戏者选择让它向左还是向右跑,它跑动的速度也是1米/秒。当Jimmy跑到平台的边缘时,开始继续下落。Jimmy每次下落的高度不能超

2016-08-10 14:33:50 1230

原创 HDU2859 有毒的DP

卧槽调试了一个下午 竟然是…. 初始化有问题!!!!!!!! 有病啊!!!!!!!!!!!!!!!!SubmitStatusPracticeHDU 2859DescriptionToday is army day, but the servicemen are busy with the phalanx for the celebration of the 60th anniversary o

2016-08-06 21:30:11 387

原创 POJ3616

DescriptionBessie is such a hard-working cow. In fact, she is so focused on maximizing her productivity that she decides to schedule her next N (1 ≤ N ≤ 1,000,000) hours (conveniently labeled 0..N-1) s

2016-08-06 10:18:00 443

原创 HDU1260简单DP

这个DP比较简单 dp存的就是当前最小值的状态 要知道最新的这个只考虑这么几种状态 一个就是最后边这个是单个的,一个就是最后这个是连体的 那么这就很简单了~~~#include<iostream>#include<algorithm>#include<cstdio>using namespace std;int k[2001];int kq[2002];int dp[5000];

2016-08-05 17:40:12 260

原创 HDU1024 这压缩真先进...先进的我想跳河

DescriptionNow I think you have got an AC in Ignatius.L’s “Max Sum” problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now you are faced with a more difficult probl

2016-08-05 12:46:30 1321 4

原创 HDU1950LIS裸题

没啥好说的“#include<iostream>#include<algorithm>#include<string>#include<cstdlib>using namespace std;int zhi[40001];int dp[40001];int len;int main(){ int T; cin >> T; while (T--) {

2016-08-04 23:16:38 334

原创 HDU1025 nlogn的LIS

Problem DescriptionJGShining’s kingdom consists of 2n(n is no more than 500,000) small cities which are located in two parallel lines.Half of these cities are rich in resource (we call them rich cities

2016-08-04 19:35:28 282

原创 POJ1384完全背包

DescriptionBefore ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea behind

2016-08-03 19:37:54 507

原创 POJ3624 01背包

这题太裸 就是从后向前一个一个填,一种一种的填 拿出来他的重量,加进去他的价值#include<iostream>#include<cmath>#include<queue>#include<algorithm>#include<cstdlib>using namespace std;int dp[12881];int zhi[3403];int zhong[3403];int

2016-08-02 16:05:11 254

原创 POJ3186迷之DP

这DP和前面做的那几个不是很一样 状态转移的比较奇怪.. 思路就是从左右各拿几个的最优解是固定的 就这么转移了#include<iostream>#include<cmath>#include<string>#include<algorithm>using namespace std;long long dp[2001][2001];long long zhi[2001];int

2016-08-01 20:18:40 344

空空如也

空空如也

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

TA关注的人

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