自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 离散数学真值表(c语言编程实现)

#include <stdio.h>#include <string.h>#include <algorithm>#include <iostream>#include<cmath>#define ll long longusing namespace std;struct node{ int a[5000]; in...

2018-10-25 23:35:30 9358 1

原创 浅谈数位DP

 数位dp是一种计数用的dp,一般就是要统计一个区间[le,ri]内满足一些条件数的个数。所谓数位dp,字面意思就是在数位上进行dp咯。数位还算是比较好听的名字,数位的含义:一个数有个位、十位、百位、千位......数的每一位就是数位啦!之所以要引入数位的概念完全就是为了dp。数位dp的实质就是换一种暴力枚举的方式,使得新的枚举方式满足dp的性质,然后记忆化就可以了。两种不同的枚举:对于...

2018-10-25 18:20:18 192

原创 hdu3555----Bomb 数位DP

HDU3555----BombTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 4594    Accepted Submission(s): 1601Problem DescriptionThe counter-terrori...

2018-10-25 17:27:13 111

原创 hdu 2089 不要62 数位DP

不要62Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7767    Accepted Submission(s): 2396Problem Description杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。杭州交...

2018-10-25 17:19:06 98

原创 hdu4734 H - F(x) 数位DP

F(x)Time Limit: 1000/500 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8478    Accepted Submission(s): 3339 Problem DescriptionFor a decimal number x with n...

2018-10-25 16:50:30 187

原创 POJ - 3252 Round Numbers 数位DP

Round NumbersTime Limit: 2000MS   Memory Limit: 65536K Total Submissions: 16527   Accepted: 6821 DescriptionThe cows, as you know, have no fingers or thumbs and thus are unable to ...

2018-10-24 23:55:48 123

原创 hdu3709 Balanced Number (数位DP+bfs)

Balanced NumberProblem DescriptionA balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagine each digit as a box with weight in...

2018-10-24 23:50:39 109

原创 顺序栈and链栈的数制转换

顺序栈 #include<cstdio>#include<cmath>#include<iostream>#include<cstring>#include<algorithm>#include<map>#include<vector>#define N 100005#define ll lo

2018-10-24 18:49:54 632

原创 HDU - 3652 B-number(数位DP)

传送门B-numberProblem DescriptionA wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string "13" and can be divided by 13. For example, 130 and 2613 ...

2018-10-22 14:11:05 145

原创 CF55D. Beautiful numbers 数位dp

传送门Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if and only if it is divisible by each of its nonzero digits. We will not argue...

2018-10-22 13:59:33 172

原创 1036 商务旅行 lca 离线

题目描述 Description某首都城市的商人要经常到各城镇去做生意,他们按自己的路线去做,目的是为了更好的节约时间。假设有N个城镇,首都编号为1,商人从首都出发,其他各城镇之间都有道路连接,任意两个城镇之间如果有直连道路,在他们之间行驶需要花费单位时间。该国公路网络发达,从首都出发能到达任意一个城镇,并且公路网络不会存在环。你的任务是帮助该商人计算一下他的最短旅行时间。输入描述...

2018-10-13 15:30:24 131

原创 poj 1330 Nearest Common Ancestors lca 离线 有根图

Nearest Common AncestorsTime Limit: 1000MS   Memory Limit: 10000K Total Submissions: 35024   Accepted: 17736 DescriptionA rooted tree is a well-known data structure in computer sci...

2018-10-13 15:24:08 114

原创 KMP专题

第一题 hdu 1711 Number Sequence点击打开hdu 1711思路:1 kmp是用来匹配字符串,只能够匹配单一的字符串2 kmp的算法的过程:  1:假设文本串的长度为n,模式串的长度为m;  2:先例用O(m)的时间去预处理next数组,next数组的意思指的是当前的字符串匹配失败后要转到的下一个状态;  3:利用o(n)的时间去完成匹配;3 时间复杂度...

2018-10-04 21:24:56 226

原创 hdu 2087 kmp

剪花布条Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 30100    Accepted Submission(s): 18501 Problem Description一块花布条,里面有些图案,另有一块直接可用的小饰条,...

2018-10-04 21:12:11 96

原创 poj 2752 kmp 前后缀

Seek the Name, Seek the FameTime Limit: 2000MS   Memory Limit: 65536K Total Submissions: 24500   Accepted: 12787 DescriptionThe little cat is so famous, that many couples tramp ove...

2018-10-03 10:01:57 195

原创 hdu 2203 kmp 亲和串

亲和串Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 18150    Accepted Submission(s): 8017Problem Description人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界...

2018-10-01 16:24:12 128

原创 hdu 1358 kmp 最小循环节

  Period Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 13151    Accepted Submission(s): 6144   Problem Description For ...

2018-10-01 16:04:30 146

空空如也

空空如也

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

TA关注的人

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