- 博客(14)
- 收藏
- 关注
原创 Codeforces Round#375 C:Polycarp at the Radio(贪心)
原题链接:点击打开链接 C. Polycarp at the Radio time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Polycar
2016-10-05 09:30:11
463
原创 CodeForces Round#374 C:Journey(dfs图论+dp)
原题链接:点击打开链接 C. Journey time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Recently Irina arri
2016-10-03 14:41:49
444
原创 CodeForces Round#340 E:XOR and Favorite Number(莫队算法)
E. XOR and Favorite Number time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Bob has a favorite number k and
2016-10-02 21:43:32
441
原创 BestCoder Round#88 1001 Find Q 水题
Find Q Accepts: 392 Submissions: 780 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others) Problem Description Byteasar is addicted to the
2016-10-02 18:45:15
449
原创 POJ 2586 Y2K Accounting Bug (贪心)
Y2K Accounting Bug Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 13878 Accepted: 7019 Description Accounting for Computer Machinists (ACM) has sufferred
2016-09-30 13:03:22
360
原创 POJ 1328 Radar Installation (贪心+线段覆盖)
Radar Installation Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 77865 Accepted: 17424 Description Assume the coasting is an infinite straight line. Land
2016-09-29 15:38:13
352
原创 POJ1753 Flip Game(位压+BFS)
原题链接:点击打开链接 Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 40857 Accepted: 17742 Description Flip game is played on a rectangular 4x4 fie
2016-09-27 22:46:37
617
转载 【二分枚举】修补木桶
描述 一只木桶能盛多少水,并不取决于桶壁上最高的那块木板,而恰恰取决于桶壁上最短的那块。 已知一个木桶的桶壁由N块木板组成,第i块木板的长度为Ai。 现在小Hi有一个快捷修补工具,每次可以使用修补工具将连续的不超过L块木板提高至任意高度。 已知修补工具一共可以使用M次(M*L 注意: 木板是环形排列的,第N-1块、第N块和第1块也被视为连续的。 输入 第1
2016-08-29 14:01:24
923
原创 【序列型DP】最长严格上升子序列
题目描述 Description 给一个数组a1, a2 ... an,找到最长的上升降子序列ab1b2< .. bk,其中b1 输出长度即可。 输入描述 Input Description 第一行,一个整数N。 第二行 ,N个整数(N 输出描述 Output Description 输出K的极大值,即最长不下降子序列的长度
2016-08-27 20:35:36
613
原创 【贪心】线段覆盖
题目描述 Description 给定x轴上的N(0 输入描述 Input Description 输入第一行是一个整数N。接下来有N行,每行有二个空格隔开的整数,表示一条线段的二个端点的坐标。 输出描述 Output Description 输出第一行是一个整数表示最多剩下的线段数。 样例输入 Sam
2016-08-25 17:00:44
8374
1
转载 【划分型DP】数字游戏
在cv上看到一个题解思路清晰,特地搬来这里存一下。 题目描述 Description 丁丁最近沉迷于一个数字游戏之中。这个游戏看似简单,但丁丁在研究了许多天之后却发觉原来在简单的规则下想要赢得这个游戏并不那么容易。游戏是这样的,在你面前有一圈整数(一共n个),你要按顺序将其分为m个部分,各部分内的数字相加,相加所得的m个结果对10取模后再相乘,最终得到一个数k。游戏的要
2016-08-20 11:08:25
1074
原创 【划分型DP】统计单词个数
//f[i][j]表示i->j区间有多少符合的单词 //dp[i][j]表示前i个分成j段的最大值 #include #include #include #include using namespace std; int f[210][210], dp[210][210]; int n, p, k, tot, s; string str2[50]; char str[50][5
2016-08-20 09:15:29
741
原创 【划分型DP】整数划分
作为划分型DP中的基础题,在今天也算是完成了,对DP的用法也渐渐明朗起来。 题目描述 Description 将整数n分成k份,且每份不能为空,任意两种划分方案不能相同(不考虑顺序)。 例如:n=7,k=3,下面三种划分方案被认为是相同的。 1 1 5 1 5 1 5 1 1 问有多少种不同的分法。 输入描述 Input De
2016-08-14 21:52:08
1758
原创 【背包型DP】装箱问题
前阵子看了几天DP,今天来练练手。(codevs) 题目描述 Description 有一个箱子容量为V(正整数,0<=V<=20000),同时有n个物品(0<n<=30),每个物品有一个体积(正整数)。 要求n个物品中,任取若干个装入箱内,使箱子的剩余空间为最小。 输入描述 Input Description 一个整数v,表示箱子
2016-08-14 21:37:18
898
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅