随笔分类 - DP-其他
1
摘要:地址:http://www.lydsy.com/JudgeOnline/problem.php?id=2806 题目: 2806: [Ctsc2012]Cheat Description Input 第一行两个整数N,M表示待检查的作文数量,和小强的标准作文库的行数接下来M行的01串,表示标准作文库
阅读全文
摘要:地址:http://www.lydsy.com/JudgeOnline/problem.php?id=3998 题面: 3998: [TJOI2015]弦论 Description 对于一个给定长度为N的字符串,求它的第K小子串是什么。 对于一个给定长度为N的字符串,求它的第K小子串是什么。 Inp
阅读全文
摘要:地址:http://acm.hdu.edu.cn/showproblem.php?pid=2457 题目: DNA repair Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total
阅读全文
摘要:题目: Problem D. Great AgainInput file: standard inputOutput file: standard outputTime limit: 2 secondsMemory limit: 512 megabytesThe election in Berlan
阅读全文
摘要:地址:http://acm.uestc.edu.cn/#/problem/show/1587 题目: 失恋772002天 失恋772002天 Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others)
阅读全文
摘要:地址:http://codeforces.com/contest/768/problem/D 题目: D. Jon and Orbs time limit per test 2 seconds memory limit per test 256 megabytes input standard in
阅读全文
摘要:地址:http://codeforces.com/contest/765/problem/E 题目: E. Tree Folding time limit per test 2 seconds memory limit per test 512 megabytes input standard in
阅读全文
摘要:地址:http://codeforces.com/contest/766/problem/E 题目: E. Mahmoud and a xor trip time limit per test 2 seconds memory limit per test 256 megabytes input s
阅读全文
摘要:地址:http://codeforces.com/contest/766/problem/C 题目: C. Mahmoud and a Message time limit per test 2 seconds memory limit per test 256 megabytes input st
阅读全文
摘要:While some people travel in space from planet to planet and discover new worlds, the others who live on Earth still have to get up in the morning, go
阅读全文
摘要:地址:http://codeforces.com/problemset/problem/744/C 题目: C. Hongcow Buys a Deck of Cards time limit per test 2 seconds memory limit per test 256 megabyte
阅读全文
摘要:题目地址:http://poj.org/problem?id=1463 题目: Strategic game Time Limit: 2000MS Memory Limit: 10000K Total Submissions: 7929 Accepted: 3692 Description Bob
阅读全文
摘要:传送门:http://codeforces.com/problemset/problem/711/C 题目: C. Coloring Trees time limit per test 2 seconds memory limit per test 256 megabytes input stand
阅读全文
摘要:题目地址:http://poj.org/problem?id=3903 题目: Description The world financial crisis is quite a subject. Some people are more relaxed while others are quite
阅读全文
摘要:这是一篇讲的很好很好的博文:http://www.cnblogs.com/python27/archive/2013/09/05/3303721.html #include using namespace std; int dp[10000][10000]; int coin[]={0,1,5,10,25,50}; void fd(int x) { for(int i=0;i<=5;...
阅读全文
摘要:#include using namespace std; int dp[10000][10000]; int lcs(string str,int n){ int tmp; memset(dp,0,sizeof(dp)); for(int i=0; i>n; while(n--) { cin>>s; int x=lcs...
阅读全文
摘要:地址:http://acm.hdu.edu.cn/showproblem.php?pid=1025 题目: Problem Description JGShining's kingdom consists of 2n(n is no more than 500,000) small cities w
阅读全文
摘要:地址:http://www.codeforces.com/problemset/problem/118/D 题目: Gaius Julius Caesar, a famous general, loved to line up his soldiers. Overall the army had n
阅读全文
摘要:地址:http://acm.hdu.edu.cn/showproblem.php?pid=1024 题目: Problem Description Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a br
阅读全文
摘要:(1)转自rockZ的博文 UVa 10328 - Coin Toss (递推) 题意:给你一个硬币,抛掷n次,问出现连续至少k个正面向上的情况有多少种。 原题中问出现连续至少k个H的情况,很难下手。我们可以试着将问题转化一下。 设dp[i][j]表示抛掷i个硬币出现连续至多j个H的情况种数。 实际
阅读全文
1