自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

记录成长的点点滴滴. . . . .

Code can change world!

  • 博客(325)
  • 资源 (1)
  • 收藏
  • 关注

原创 CF 8C Looking for Order(状压dp)

C. Looking for Ordertime limit per test4 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputGirl Lena likes it when everything is

2015-08-20 08:56:28 989

原创 hdu 3624 City Planning(暴力,也可扫描线)

City PlanningTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 503    Accepted Submission(s): 213Problem DescriptionAfter many yea

2015-08-19 15:36:18 776

转载 树形dp

树,一种十分优美的数据结构,因为它本身就具有的递归性,所以它和子树见能相互传递很多信息,还因为它作为被限制的图在上面可进行的操作更多,所以各种用于不同地方的树都出现了,二叉树、三叉树、静态搜索树、AVL树,线段树、SPLAY树,后缀树等等..     枚举那么多种数据结构只是想说树方面的内容相当多,本专辑只针对在树上的动态规划,即树形DP.做树形DP一般步骤是先将树转换为有根树,然后在树上

2015-08-17 09:02:30 1122

原创 hdu 3255 Farming(线段树求体积并)

FarmingTime Limit: 12000/6000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1445    Accepted Submission(s): 428Problem DescriptionYou have a big farm, a

2015-08-15 20:12:57 794

原创 hdu3779Railroad(记忆化搜索|dp)

RailroadTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 828    Accepted Submission(s): 334Problem DescriptionA train yard is a c

2015-08-13 20:38:49 494

原创 FZU1860 :Funny Hash game I(位运算)

首页题库排名竞赛交流帮助活动V评判登录FZU1860 :Funny Hash game I时间限制:1000MS    内存限制:32768KByte   64位IO格式:%I64d & %I64u描述A classic string hashing algorithm can

2015-08-12 20:01:57 527

原创 FZU 1848 – ZeroZeroZeros (找规律+二分)

ZeroZeroZerosTime Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uSubmit StatusDescriptionAs we know n!=1*2*3*…*n, but n! could be extreme huge.

2015-08-12 19:52:41 594

原创 FZU 1853 Number Deletion(贪心)

Problem 1853 Number DeletionAccept: 83    Submit: 258Time Limit: 1000 mSec    Memory Limit : 32768 KB Problem DescriptionGiven you one n-digital positive integer a,After removing any

2015-08-12 10:43:27 570

转载 组合数取模(数论)

组合数取模在ACM竞赛中是一个很重要的问题,很多选手因为数据太大而束手无策,今天就来详细讲解它。 组合数取模就是求的值,当然根据,和的取值范围不同,采取的方法也不一样。 接下来,我们来学习一些常见的取值情况 (1)和      这个问题比较简单,组合数的计算可以靠杨辉三角,那么由于和的范围小,直接两层循环即可。 (2)

2015-08-07 09:44:41 624

转载 组合数取模(数论)

LL n,m,p;    LL quick_mod(LL a, LL b)  {      LL ans = 1;      a %= p;      while(b)      {          if(b & 1)          {              ans = ans * a % p;              b--;     

2015-08-07 09:40:05 156

原创 HDU 1024 Max Sum Plus Plus((最大m段子段和))(动态规划经典)

Max Sum Plus PlusTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20343    Accepted Submission(s): 6721Problem DescriptionNow I t

2015-08-03 20:39:07 741

原创 CodeForces 148E Porcelain(dp+背包)

E. Porcelaintime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDuring her tantrums the princess usually smash

2015-08-03 15:40:59 609

原创 codeforces 67A Partial Teacher( 贪心)

A. Partial Teachertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA teacher decides to give toffees to his

2015-08-03 14:41:20 470

原创 hdu1074:doing homework(状压dp)

Doing HomeworkTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6308    Accepted Submission(s): 2714Problem DescriptionIgnatius ha

2015-08-01 19:49:24 478

原创 ZOJ 3587 fsdgsdsvds(dp+sstiti)

Marlon's StringTime Limit: 2 Seconds      Memory Limit: 65536 KBLong long ago, there was a coder named Marlon. One day he picked two string on the street. A problem suddenly crash his brain...

2015-07-31 20:17:30 234

原创 zoj 3772 Calculate the Function(线段树+矩阵乘法)

Calculate the FunctionTime Limit: 2 Seconds      Memory Limit: 65536 KB You are given a list of numbers A1 A2 ..AN and M queries. For the i-th query: The query has two parameters L

2015-04-23 15:37:09 873

原创 hdu 4274 Spy's Work(水题)

Spy's WorkTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1266    Accepted Submission(s): 388Problem DescriptionI'm a manager of a l

2014-10-29 13:46:54 1032

原创 hdu 4268 Alice and Bob(multiset|线段树)

Alice and BobTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2901    Accepted Submission(s): 941Problem DescriptionAlice and Bob's

2014-10-29 13:39:09 1112

原创 hdu 5071 Chat(模拟|Splay)

ChatTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 571    Accepted Submission(s): 136Problem DescriptionAs everyone knows, DRD ha

2014-10-23 23:24:13 1400

原创 hdu 4819 Mosaic(二维线段树)

MosaicTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 647    Accepted Submission(s): 245Problem DescriptionThe God of sheep decid

2014-10-21 10:09:44 1500

原创 hdu 2089 不要62(数位DP)

不要62Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 20166    Accepted Submission(s): 6911Problem Description杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoe

2014-10-20 17:38:34 1079

原创 bzoj 1026 windy数(数位DP)

1026: [SCOI2009]windy数Time Limit: 1 Sec  Memory Limit: 162 MBSubmit: 2615  Solved: 1155[Submit][Status]Descriptionwindy定义了一种windy数。不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。 windy想知道,在A和B之间,包括A和B,总共

2014-10-20 15:44:59 970

原创 ural 1057 Amount of Degrees(数位DP)

1057. Amount of DegreesTime limit: 1.0 secondMemory limit: 64 MBCreate a code to determine the amount of integers, lying in the set [X;Y] and being a sum of exactlyK different integer de

2014-10-20 13:35:51 978

原创 hdu 4812 D Tree(树的点分治)

D TreeTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 1687    Accepted Submission(s): 263Problem DescriptionThere is a skyscrapin

2014-10-19 15:09:18 1550

原创 BestCoder Round #14

Harry And Physical TeacherTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 38    Accepted Submission(s): 34Problem DescriptionAs we a

2014-10-18 22:30:02 1473

原创 hdu 4622 Reincarnation(后缀数组|后缀自动机|KMP)

ReincarnationTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 2138    Accepted Submission(s): 732Problem DescriptionNow you are back

2014-10-17 21:37:52 1432

原创 UvaLive 6667 Longest Chain (分治求三元组LIS&树状数组)

题目链接:here题意:和hdu4742类似。区别就是一部分三元组是直接给出的。还有一部分是用他给的那个函数生成的。还有就是这里的大于是严格的大于a>b必须ax>bx,ay>by,az>bz。思路:思路也和hdu4742here类似。只是有几个比较棘手的问题。现在变成严格大于了。对于y还是很好办的。我们在排序y的时候可以使的标号大的排在前面这样就可以防止y和它一样的更新它了

2014-10-10 00:10:30 1627

原创 hdu 4742 Pinball Game 3D(三维LIS&cdq分治&BIT维护最值)

Pinball Game 3DTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 688    Accepted Submission(s): 276Problem DescriptionRD is a smart b

2014-10-08 23:05:51 1938

原创 BestCoder Round #12 War(计算几何)

WarTime Limit: 8000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 81    Accepted Submission(s): 23Special JudgeProblem DescriptionLong long ago the

2014-10-06 00:44:02 1629

原创 uvalive 6669 hidden tree(好壮压dp)

题目见here题意:给一个序列arr[],你从中选择一些子序列,将子序列的值从左往右依次放到某棵二叉树的叶子节点上,使得除了叶子,所有节点左右子树权和相等。子树的权和 = 子树叶子的权和。如果存在这样一棵二叉树,选择的子序列就是合法的。问,最长的合法子序列是多少。思路:枚举二叉树可能的叶子的最小权(入手点),显然,能和此数一起组成二叉树的数,要么和这个数相等,要么是这个数的2^k倍。把

2014-10-03 00:00:15 1917

原创 hdu 4412 Sky Soldiers(区间DP)

Sky SoldiersTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 559    Accepted Submission(s): 181Problem DescriptionAn airplane carried

2014-10-02 21:44:21 1125

原创 hdu 5030 Rabbit's String(后缀数组&二分)

Rabbit's StringTime Limit: 40000/20000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 288    Accepted Submission(s): 108Problem DescriptionLong long ago,

2014-10-01 21:44:45 1333 1

原创 hdu 1024 Max Sum Plus Plus(DP&最大连续和加强版)

Max Sum Plus PlusTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16843    Accepted Submission(s): 5539Problem DescriptionNow I think

2014-09-30 17:58:21 1277

原创 Codeforces Beta Round #10 D. LCIS(DP&LCIS)

D. LCIStime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis problem differs from one which was on the onlin

2014-09-29 23:50:32 1562 1

原创 hdu 4409 Family Name List(LCA&有坑点)

Family Name ListTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 882    Accepted Submission(s): 271Problem DescriptionKong belong

2014-09-29 23:35:04 1140

原创 BestCoder Round #11 (Div. 2)题解集合

Alice and BobTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 155    Accepted Submission(s): 110Problem DescriptionBob and Alice got

2014-09-29 10:36:51 1194

原创 hdu 4417 Super Mario(离线树状数组|划分树)

Super MarioTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2584    Accepted Submission(s): 1252Problem DescriptionMario is world-fam

2014-09-26 20:22:57 1077

原创 hdu 5033 Building(斜率优化)

BuildingTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1237    Accepted Submission(s): 350Special JudgeProblem DescriptionOnce u

2014-09-24 21:46:09 965

原创 hdu 4416 Good Article Good sentence(后缀数组&思维)

Good Article Good sentenceTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2308    Accepted Submission(s): 649Problem DescriptionIn m

2014-09-23 23:13:56 1181

原创 hdu 5035 Delivery(概率&分部积分)

DeliveryTime Limit: 3000/1500 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 156    Accepted Submission(s): 97Problem DescriptionToday, Matt goes to de

2014-09-22 21:39:24 1081

空空如也

空空如也

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

TA关注的人

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