<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[dml_96的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/dml_96</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; dml_96]]></copyright><item><title><![CDATA[lightoj 1283 1283 - Shelving Books(dp)]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51465112</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51465112</guid><author>dml_96</author><pubDate>Fri, 20 May 2016 23:16:29 +0800</pubDate><description><![CDATA[#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
typedef long long ll;
int INF = 0x3f3f3f3f;
const int N = 1e2 + 10;
int dp[N][N][N], a[N], b[N], c]]></description><category></category></item><item><title><![CDATA[51nod 1455 宝石猎人(dp or 记忆化搜索)]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51352002</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51352002</guid><author>dml_96</author><pubDate>Mon, 09 May 2016 12:03:45 +0800</pubDate><description><![CDATA[苏塞克岛是一个有着30001个小岛的群岛，这些小岛沿着一条直线均匀间隔分布，从西到东编号为0到30000。众所周知，这些岛上有很多宝石，在苏塞克岛上总共有n颗宝石，并且第i颗宝石位于岛 pi上。

小法正好到达0号小岛上，他拥有卓越的跳跃能力，能根据以下规则在小岛之间向东重复跳跃：

·        首先，他会从0号岛跳到d号岛

·        此后，他会根据以下规则继续跳跃，L]]></description><category></category></item><item><title><![CDATA[51nod 1405 树的距离之和]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51336900</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51336900</guid><author>dml_96</author><pubDate>Sat, 07 May 2016 11:13:15 +0800</pubDate><description><![CDATA[给定一棵无根树，假设它有n个节点，节点编号从1到n, 求任意两点之间的距离（最短路径）之和。




Input
第一行包含一个正整数n (n <= 100000)，表示节点个数。
后面(n - 1)行，每行两个整数表示树的边。

Output
每行一个整数，第i(i = 1,2,...n)行表示所有节点到第i个点的距离之和。

Input示例
4
1 2
3 2
4 2]]></description><category></category></item><item><title><![CDATA[51nod 1732 51nod婚姻介绍所]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51330142</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51330142</guid><author>dml_96</author><pubDate>Fri, 06 May 2016 11:23:50 +0800</pubDate><description><![CDATA[51nod除了在做OJ之外，还开展了很多副业。婚姻介绍所就是其中之一。


对于一个客户，我们可以使用一个字符串来描述该客户的特质。


假设现在我们有两个客户A和B。


A的特质字符串为：abcdefg
B的特质字符串为：abcxyz


则A和B的匹配度f(A, B)为A和B的最长公共前缀的长度，即len('abc') = 3


由于最近51nod经费紧张，]]></description><category></category></item><item><title><![CDATA[51nod 1640 天气晴朗的魔法]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51329902</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51329902</guid><author>dml_96</author><pubDate>Fri, 06 May 2016 11:02:14 +0800</pubDate><description><![CDATA[51nod魔法学校近日开展了主题为“天气晴朗”的魔法交流活动。


N名魔法师按阵法站好，之后选取N - 1条魔法链将所有魔法师的魔力连接起来，形成一个魔法阵。


魔法链是做法成功与否的关键。每一条魔法链都有一个魔力值V，魔法最终的效果取决于阵中所有魔法链的魔力值的和。


由于逆天改命的魔法过于暴力，所以我们要求阵中的魔法链的魔力值最大值尽可能的小，与此同时，魔力值之和要尽可]]></description><category></category></item><item><title><![CDATA[51nod 1478 括号序列的最长合法子段]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51321345</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51321345</guid><author>dml_96</author><pubDate>Thu, 05 May 2016 11:26:12 +0800</pubDate><description><![CDATA[这里有另一个关于处理合法的括号序列的问题。

如果插入“+”和“1”到一个括号序列，我们能得到一个正确的数学表达式，我们就认为这个括号序列是合法的。例如，序列"(())()", "()"和"(()(()))"是合法的，但是")(", "(()"和"(()))("是不合法的。

这里有一个只包含“（”和“）”的字符串，你需要去找到最长的合法括号子段，同时你要找到拥有最长长度的子段串的个数。]]></description><category></category></item><item><title><![CDATA[51nod 1624 取余最长路]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51321255</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51321255</guid><author>dml_96</author><pubDate>Thu, 05 May 2016 11:20:03 +0800</pubDate><description><![CDATA[佳佳有一个n*m的带权矩阵，她想从(1,1)出发走到(n,m)且只能往右往下移动，她能得到的娱乐值为所经过的位置的权的总和。

有一天，她被下了恶毒的诅咒，这个诅咒的作用是将她的娱乐值变为对p取模后的值，这让佳佳十分的不开心，因为她无法找到一条能使她得到最大娱乐值的路径了！

她发现这个问题实在是太困难了，既然这样，那就只在3*n的矩阵内进行游戏吧！

现在的问题是，在一个3*n的带权]]></description><category></category></item><item><title><![CDATA[HDU 5677 ztr loves substring （dp)]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51289989</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51289989</guid><author>dml_96</author><pubDate>Sun, 01 May 2016 12:08:07 +0800</pubDate><description><![CDATA[Problem Description

ztr love reserach substring.Today ,he has n string.Now ztr want to konw,can he take out exactly k palindrome from all substring of these n string,and thrn sum of length of these]]></description><category></category></item><item><title><![CDATA[HDU 5676]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51289561</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51289561</guid><author>dml_96</author><pubDate>Sun, 01 May 2016 09:59:51 +0800</pubDate><description><![CDATA[Problem Description

ztr loves lucky numbers. Everybody knows that positive integers are lucky if their decimal representation doesn't contain digits other than 4 and 7. For example, numbers 47, 744]]></description><category></category></item><item><title><![CDATA[HDU 5671 Matrix]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51228136</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51228136</guid><author>dml_96</author><pubDate>Sat, 23 Apr 2016 20:48:17 +0800</pubDate><description><![CDATA[Matrix
Time Limit: 3000/1500 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)
Total Submission(s): 477    Accepted Submission(s): 207



Problem Description

There is a matrix M]]></description><category></category></item><item><title><![CDATA[HDU 5672 String（尺取法）]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51225676</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51225676</guid><author>dml_96</author><pubDate>Sat, 23 Apr 2016 12:28:37 +0800</pubDate><description><![CDATA[Problem Description

There is a string S.S only
 contain lower case English character.(10≤length(S)≤1,000,000)
How many substrings there are that contain at least k(1≤k≤26) distinct
 characters?]]></description><category></category></item><item><title><![CDATA[lightoj 1017 - Brush (III)（dp）]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51103621</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51103621</guid><author>dml_96</author><pubDate>Sat, 09 Apr 2016 10:25:34 +0800</pubDate><description><![CDATA[1017 - Brush (III)




   
PDF (English)
Statistics
Forum








Time Limit: 2 second(s)
Memory Limit: 32 MB





Samir returned home from the contest and got angry after seei]]></description><category></category></item><item><title><![CDATA[lightoj 1122 - Digit Count(dp)]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51090176</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51090176</guid><author>dml_96</author><pubDate>Thu, 07 Apr 2016 22:41:09 +0800</pubDate><description><![CDATA[Time Limit: 2 second(s)
Memory Limit: 32 MB





Given a set of digits S, and an integer n, you have to find how many n-digit integers are there, which contain digits that belong to S and the d]]></description><category></category></item><item><title><![CDATA[lightoj 1033 - Generating Palindromes（区间dp）]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51089987</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51089987</guid><author>dml_96</author><pubDate>Thu, 07 Apr 2016 22:33:24 +0800</pubDate><description><![CDATA[1033 - Generating Palindromes




   
PDF (English)
Statistics
Forum








Time Limit: 2 second(s)
Memory Limit: 32 MB





By definition palindrome is a string which is not ]]></description><category></category></item><item><title><![CDATA[lightoj 1011 - Marriage Ceremonies(状态压缩dp)]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51043424</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51043424</guid><author>dml_96</author><pubDate>Sat, 02 Apr 2016 12:21:48 +0800</pubDate><description><![CDATA[Time Limit: 2 second(s)
Memory Limit: 32 MB





You work in a company which organizes marriages. Marriages are not that easy to be made, so, the job is quite hard for you.
The job gets more d]]></description><category></category></item><item><title><![CDATA[lightoj 1005 ROOKS（组合数）]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51039570</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51039570</guid><author>dml_96</author><pubDate>Fri, 01 Apr 2016 21:27:24 +0800</pubDate><description><![CDATA[A rook is a piece used in the game of chess which is played on a board of square grids. A rook can only move vertically or horizontally from its current position and two rooks attack each other if one]]></description><category></category></item><item><title><![CDATA[codeforces 659E New Reform]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/51039390</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/51039390</guid><author>dml_96</author><pubDate>Fri, 01 Apr 2016 20:41:48 +0800</pubDate><description><![CDATA[E. New Reform


time limit per test
1 second


memory limit per test
256 megabytes


input
standard input


output
standard output



Berland has n cities connected by m bidirectio]]></description><category></category></item><item><title><![CDATA[poj 题目分类 很好很有层次感]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/50719098</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/50719098</guid><author>dml_96</author><pubDate>Mon, 22 Feb 2016 21:15:51 +0800</pubDate><description><![CDATA[转自kuangbin博客园。
初期:
一.基本算法:
     (1)枚举. (poj1753,poj2965)
     (2)贪心(poj1328,poj2109,poj2586)
     (3)递归和分治法.
     (4)递推.
     (5)构造法.(poj3295)
     (6)模拟法.(poj1068,poj2632,poj1573,poj2993,poj2]]></description><category></category></item><item><title><![CDATA[Codeforces Round #343 (Div. 2) D. Babaei and Birthday Cake（离散化+线段树)]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/50707291</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/50707291</guid><author>dml_96</author><pubDate>Sun, 21 Feb 2016 10:05:42 +0800</pubDate><description><![CDATA[D. Babaei and Birthday Cake


time limit per test
2 seconds


memory limit per test
256 megabytes


input
standard input


output
standard output



As you know, every birthday par]]></description><category></category></item><item><title><![CDATA[HDU 2476 String painter（区间dp)]]></title><link>https://blog.youkuaiyun.com/dml_96/article/details/50704693</link><guid>https://blog.youkuaiyun.com/dml_96/article/details/50704693</guid><author>dml_96</author><pubDate>Sat, 20 Feb 2016 14:50:28 +0800</pubDate><description><![CDATA[Problem Description

There are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter. With the help of the painter, you can ch]]></description><category></category></item></channel></rss>