自定义博客皮肤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 Order time limit per test 4 seconds memory limit per test 512 megabytes input standard input output standard output Girl Lena likes it when everything is

2015-08-20 08:56:28 1078

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

City Planning Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 503    Accepted Submission(s): 213 Problem Description After many yea

2015-08-19 15:36:18 843

转载 树形dp

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

2015-08-17 09:02:30 1190

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

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

2015-08-15 20:12:57 881

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

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

2015-08-13 20:38:49 564

原创 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 589

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

ZeroZeroZeros Time Limit: 1000MS   Memory Limit: 32768KB   64bit IO Format: %I64d & %I64u Submit Status Description As we know n!=1*2*3*…*n, but n! could be extreme huge.

2015-08-12 19:52:41 667

原创 FZU 1853 Number Deletion(贪心)

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

2015-08-12 10:43:27 634

转载 组合数取模(数论)

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

2015-08-07 09:44:41 686

转载 组合数取模(数论)

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 210

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

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

2015-08-03 20:39:07 803

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

E. Porcelain time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output During her tantrums the princess usually smash

2015-08-03 15:40:59 686

原创 codeforces 67A Partial Teacher( 贪心)

A. Partial Teacher time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A teacher decides to give toffees to his

2015-08-03 14:41:20 539

原创 hdu1074:doing homework(状压dp)

Doing Homework Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6308    Accepted Submission(s): 2714 Problem Description Ignatius ha

2015-08-01 19:49:24 539

原创 ZOJ 3587 fsdgsdsvds(dp+sstiti)

Marlon's String Time Limit: 2 Seconds      Memory Limit: 65536 KB Long 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 290

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

Calculate the Function Time 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 930

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

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

2014-10-29 13:46:54 1098

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

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

2014-10-29 13:39:09 1171

原创 hdu 5071 Chat(模拟|Splay)

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

2014-10-23 23:24:13 1471

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

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

2014-10-21 10:09:44 1566

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

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

2014-10-20 17:38:34 1126

原创 bzoj 1026 windy数(数位DP)

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

2014-10-20 15:44:59 1024

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

1057. Amount of Degrees Time limit: 1.0 second Memory limit: 64 MB Create 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 1032

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

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

2014-10-19 15:09:18 1614

原创 BestCoder Round #14

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

2014-10-18 22:30:02 1537

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

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

2014-10-17 21:37:52 1527

原创 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 1692

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

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

2014-10-08 23:05:51 2077

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

War Time Limit: 8000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 81    Accepted Submission(s): 23 Special Judge Problem Description Long long ago the

2014-10-06 00:44:02 1694

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

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

2014-10-03 00:00:15 1986

原创 hdu 4412 Sky Soldiers(区间DP)

Sky Soldiers Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 559    Accepted Submission(s): 181 Problem Description An airplane carried

2014-10-02 21:44:21 1186

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

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

2014-10-01 21:44:45 1407

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

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

2014-09-30 17:58:21 1320

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

D. LCIS time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output This problem differs from one which was on the onlin

2014-09-29 23:50:32 1637

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

Family Name List Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 882    Accepted Submission(s): 271 Problem Description Kong belong

2014-09-29 23:35:04 1202

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

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

2014-09-29 10:36:51 1282

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

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

2014-09-26 20:22:57 1126

原创 hdu 5033 Building(斜率优化)

Building Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 1237    Accepted Submission(s): 350 Special Judge Problem Description Once u

2014-09-24 21:46:09 1018

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

Good Article Good sentence Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2308    Accepted Submission(s): 649 Problem Description In m

2014-09-23 23:13:56 1259

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

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

2014-09-22 21:39:24 1156

空空如也

空空如也

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

TA关注的人

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