
ACM - 动态规划
dwenhu___
这个作者很懒,什么都没留下…
展开
-
简单的递推练习 - 阿牛的EOF牛肉串
阿牛的EOF牛肉串 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) To原创 2017-03-05 20:09:43 · 331 阅读 · 0 评论 -
Codeforces - 455 - div. 2 - C - Python Indentation - DP
题目链接:http://codeforces.com/contest/909/problem/C题意:python 语言有两种语句,simple 语句( s 语句)和 for 语句( f 语句)。其中 for 语句的循环体需要缩进一格,并且不能为空( for 语句的循环体里至少有一个 s 语句或 for 语句)。给出 n 条语句,问总共有多少种合法的缩进方法。输入:4sf...原创 2018-07-31 15:34:16 · 231 阅读 · 0 评论 -
Codeforces-336-div2-D-Zuma
题目链接:Go!题目大意: 给你一个长度为 nnn 的序列 ccc,每次操作删去当前序列的一个回文串。问:把序列全部删完,最少需要多少次的操作?数据范围:1≤n≤1051≤n≤1051 \leq n \leq 10^51≤ci≤n1≤ci≤n1 \leq c_i \leq n样例:inputinputinput31 2 1...原创 2018-04-17 11:06:14 · 106 阅读 · 0 评论 -
POJ-1141-Brackets Sequence
题目链接:Go!题目大意: 给你一个长度不超过 100100100 且只包含 (,),[,](,),[,]( , ) , [ , ] 四种字符的字符串 sss,添加 最少 的字符使其变成一个合法的字符串,输出这个合法的字符串。合法字符串的定义:EmptyEmptyEmpty sequencesequencesequence isisis ...原创 2018-04-17 11:04:23 · 225 阅读 · 0 评论 -
CF - 286 - div2 - C - Mr. Kitayuta, the Treasure Hunter (DP)
The Shuseki Islands are an archipelago of 30001 small islands in the Yutampo Sea. The islands are evenly spaced along a line, numbered from 0 to 30000 from the west to the east. These islands are know...原创 2018-03-06 09:45:50 · 238 阅读 · 0 评论 -
CF - div2 - 460 - D.Substring(拓扑排序 + DP)
D. Substring time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output You are given a graph with n nodes and m directed edges. One lowercase lette...原创 2018-03-08 12:45:43 · 286 阅读 · 0 评论 -
ZOJ - 3769 - Diablo III (分组背包 ,dp)
Diablo IIITime Limit: 2 Seconds Memory Limit: 65536 KB Diablo III is an action role-playing video game. A few days ago, Reaper of Souls (ROS), the new expansion of Diablo III, has been release原创 2018-01-30 14:23:56 · 523 阅读 · 0 评论 -
POJ - 1170 - Shopping Offers(状压dp)
Shopping OffersTime Limit: 1000MS Memory Limit: 10000K Total Submissions: 5333 Accepted: 2242 DescriptionIn a shop each kind of product has a price. For example, the price of a flower i原创 2018-01-27 14:24:06 · 386 阅读 · 0 评论 -
HDU - 2159 - FATE(完全背包)
FATETime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 16395 Accepted Submission(s): 7698Problem Description 最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备原创 2018-01-25 15:46:39 · 237 阅读 · 0 评论 -
HDU - 2844 - Coins (多重背包,dp)
CoinsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 17216 Accepted Submission(s): 6809Problem Description Whuacmers use coins.They ha原创 2018-01-24 23:29:37 · 237 阅读 · 0 评论 -
HDU-2955-Robberies(01背包,逆向思维)
RobberiesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 27026 Accepted Submission(s): 9959Problem Description The aspiring Roy the Ro原创 2018-01-24 12:48:33 · 305 阅读 · 0 评论 -
HDU - 1864 - 最大报销额 (浮点数 ,一维dp)
最大报销额Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 28554 Accepted Submission(s): 8789Problem Description 现有一笔经费可以报销一定额度的发票。允许报销的发票类型原创 2018-01-22 15:01:02 · 413 阅读 · 0 评论 -
D. Almost Identity Permutations(dp)
D. Almost Identity Permutations time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output A permutation p of size n is an array such that every inte原创 2017-11-17 20:40:06 · 692 阅读 · 0 评论 -
简单的递推练习 - 放苹果
放苹果 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 33682 Accepted: 20837原创 2017-04-10 21:06:39 · 431 阅读 · 0 评论 -
简单的递推练习 - 神、上帝以及老天爷
神、上帝以及老天爷 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 38673 Accepted Submission(s): 15856Probl原创 2017-03-06 15:36:26 · 537 阅读 · 0 评论 -
Codeforces - 501 - div3 - Bracket Substring (KMP + DP)
Codeforces - 501 - div3 - Bracket Substring (KMP + DP)题目链接:http://codeforces.com/contest/1015/problem/F题意: 给你一个 nnn 和一个字符串 sss 问:构造一个长度为 2∗n2∗n2 * n 并包含 sss 的字符串的构造方法输入:5()))()3((...原创 2018-08-02 17:15:48 · 370 阅读 · 0 评论