自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 uva10891 Game of Sum(博弈论+dp)

http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=11&problem=1832&mosmsg=Submission+received+with+ID+13415943感觉博弈题写的很纠结。。。...

2014-03-30 14:56:00 103

转载 uva10802 Lex Smallest Drive(贪心+dfs)

http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=1743&mosmsg=Submission+received+with+ID+13398732贪心的思路很明显,每次选择点权最小的走,...

2014-03-27 17:25:00 120

转载 uva11582 Colossal Fibonacci Numbers!

http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=2629好久没写博客了,随便捡道有点意思的题目写写。首先a,b的范围都到unsigned long long了有木有,最后f(a^...

2014-03-19 16:03:00 96

转载 uva10604 Chemical Reaction(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1545#include <iostream>#include <cstring>#...

2014-02-09 20:57:00 98

转载 uva10118 Free Candies(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1059此题的状态即为4个栈的顶部元素的位置#include <iostream>#includ...

2014-02-09 20:55:00 106

转载 uva10688 The Poor Giant(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1629水题记忆化dp#include <iostream>#include <cstdi...

2014-02-09 20:51:00 89

转载 uva10626 Buying Coke(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1567此题状态即为各种硬币个数,然后分类讨论即可。#include <stdio.h>#...

2014-02-09 20:50:00 101

转载 uva10912 Simple Minded Hashing(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1853#include <iostream>#include <cstring>#...

2014-02-09 20:49:00 105

转载 uva10401 Injured Queen Problem(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1342#include <iostream>#include <cstring>#...

2014-02-09 20:48:00 93

转载 uva702 The Vindictive Coach(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=643#include <iostream>#include <cstring>#d...

2014-02-09 20:47:00 153

转载 uva10721 Bar Codes(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1662#include <iostream>#define ll long longusing...

2014-02-09 20:45:00 125

转载 uva10617 Again Palindrome(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1558#include <iostream>#include <string>#i...

2014-02-09 20:43:00 78

转载 uva10304 Optimal Binary Search Tree(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1245#include <iostream>#include <cstdio>#d...

2014-02-09 20:42:00 113

转载 uva590 Always on the run(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=531#include <iostream>#include <cstdio>#de...

2014-02-09 20:41:00 102

转载 uva10943 How do you add?(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1884#include <iostream>#include <cstring>#...

2014-02-09 20:39:00 82

转载 uva711 Dividing up(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=652#include <iostream>#include <cstring>#i...

2014-02-09 20:38:00 177

转载 uva10069 Distinct Subsequences(DP+大数)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1010#include <iostream>#include <cstring>#...

2014-02-09 20:37:00 99

转载 uva10081 Tight Words(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1022#include <iostream>#include <cstdio>#i...

2014-02-09 20:35:00 134

转载 uva10400 Game Show Math(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1341注意除以0和溢出的情况#include <iostream>#include <c...

2014-02-09 20:33:00 94

转载 uva10285 Longest Run on a Snowboard(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1226#include <iostream>#include <cstring>#...

2014-02-09 20:30:00 86

转载 uva10465 Homer Simpson(水题)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1406#include <iostream>using namespace std;int m...

2014-02-09 20:27:00 87

转载 uva348 Optimal Array Multiplication Sequence(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=284水题#include <iostream>#include <cstring>...

2014-02-09 20:25:00 77

转载 uva116 Unidirectional TSP(DP)

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=52水题#include <iostream>#include <cstring&gt...

2014-02-09 20:19:00 92

转载 uva 607 Scheduling Lectures(DP)

很水的一道DP#include <iostream>#include <cstdio>#include <cstdlib>using namespace std;int a[1010],l,c,n;int dp[1010],cost[1010];int f(int x){ if(x==0) ret...

2014-02-09 20:02:00 82

转载 uva11598 Optimal Segments(DP 求方案)

我只能说这道题被我做成了蘑菇题。。。#include <iostream>#include <cstdio>#include <sstream>#include <string>#include <cstring>#include <vector>#include <al...

2014-02-08 17:11:00 84

转载 uva11404 Palindromic Subsequence(DP 求方案)

#include <iostream>#include <cstdio>#include <cstring>#include <string>using namespace std;char s[1010];int dp[1010][1010],l;string str[1010][1010];i...

2014-02-08 17:07:00 69

转载 uva10453 Make Palindrome(DP 求方案)

if(s[x]==s[y]) dp[x][y]=dp[x+1][y-1]+2else dp[x][y]=min(dp[x+1][y],dp[x][y-1])+2方案分开来求#include <iostream>#include <cstdio>#include <cstring>#include <set&gt...

2014-02-08 17:02:00 80

转载 uva11471 Arrange the Tiles(DP)

此题的状态是当前用了那些,和四个位置各自的颜色。#include <iostream>#include <cstdio>#include <cstring>using namespace std;int t;char block[14][4];bool vis[14];int belong[14],dp[1&...

2014-02-08 16:55:00 115

转载 uva11472 Beautiful Numbers (数位DP)

dp[l][x][used]表示长度为l尾部为x的串用了那些数字的种数#include <iostream>#include <cstring>#include <cstdio>#define mod 1000000007using namespace std;int t,n,m;int dp[110][12][...

2014-02-08 16:49:00 112

转载 uva11485 Extreme Discrete Summation(DP)

首先那括号里的一坨是所有数的小数部分相加取下整dp[x][y]表示前x个组成和为y的个数#include <iostream>#include <cstdio>#include <cstring>#define eps 1e-9#define ll long longusing namespace std;i...

2014-02-08 16:42:00 99

转载 uva11258 String Partition(DP)

dp[x]表示1-x的划分最大和,最多从前面10个位置转移过来#include <iostream>#include <cstdio>#include <cstring>#include <string>#include <sstream>#define ll long long#defi...

2014-02-08 16:37:00 91

转载 uva10593 Kites(DP)

用dp[x][y]表示以(x,y)点为右下角,所形成的图形的最大边长#include <iostream>#include <cstdio>#include <cstring>using namespace std;int n;char s[502][502];int dp1[502][502],dp2[502]...

2014-02-08 16:26:00 85

转载 uva10559 Blocks(DP 费用提前)

该题的难点在于费用的计算,需考虑未来能转移到的所有状态用dp[l][r][next]表示l到r之间以及r之后与r同色的所有next个方块的最大费用和#include <iostream>#include <cstdio>#include <cstring>using namespace std;int t,n,a[2...

2014-02-08 16:21:00 120

转载 ZOJ3741 Eternal Reality(DP)

我是渣渣。。。。。。。。。数组开小了,弹得蛋碎了,关键还返回wa,本地跑没崩掉,一点关闭就崩了。。。。。。。。。DP考虑每一位上的状态,即用和不用Level Upper,注意LV5是无效的即可,就酱。。。。。。。。 1 #include <iostream> 2 #include <cstdio> 3 #include <cs...

2013-12-29 21:28:00 104

转载 BUAA 735 晴天小猪来刷人人

一道裸的单调队列,每次把一个数加进单调队列,将队列头不符合要求的弹出队列,维护这个过程中的一个最大值。 1 #include <iostream> 2 #include <cstdio> 3 using namespace std; 4 int t,n,m; 5 int a[1000010]; 6 int q[1000010];...

2013-12-07 20:09:00 112

转载 uva11386 Triples

这道题其实就是个水题,可惜我忘了一种传说中叫双指针的东西,太弱了,呜呜。 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 #include <cstring> 5 #include <vector> 6 #i...

2013-12-04 21:39:00 92

转载 uva10048 Audiophobia

Root::Problem Set Volumes (100...1999)::Volume 9 (900-999)10048 - AudiophobiaTime limit: 3.000 secondsProblem B: AudiophobiaConsider yourself ...

2013-11-23 21:44:00 130

转载 hdu3525 Orienteering

最长公共子序列nlogn神算法,线段树换了几种姿势,怎么搞都超时,把他转换成LIS就AC了A : 3 3 1 1 2 2B : 3 2 3 1 2 1B中的每个元素在A中的位置倒序再放入B中可得 {2,1}{6,5}{2,1}{4,3}{6,5}{4,3}我们发现,B中的每一个大括号取一个数,对应A中的匹配加1,而要使A的标号递增,就把每个括号按递减顺序排列,然后...

2013-11-20 20:39:00 101

转载 hdu4115 Eliminate the Conflict

Alice要赢的话,只有两种情况,平和胜对于A和B,若要求相同,x与y不同,x->~y,y->~x 若要求不同,x与y相同,x->~y,y->~x 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring&gt...

2013-11-13 14:19:00 86

转载 FZU2136 取糖果

貌似人家都是用链表过的,我太弱了,只会用线段树,排最后了,还好1A了。。。。 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 using namespace std; 5 int t,n; 6 int dp[100010];...

2013-11-11 18:21:00 92

空空如也

空空如也

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

TA关注的人

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