线性dp
October's very own
? ? ?
展开
-
CF909C Python Indentation (dp)
CF909C Python Indentation洛谷链接思路借鉴自:链接题目描述In Python, code blocks don’t have explicit begin/end or curly braces to mark beginning and end of the block. Instead, code blocks are defined by indentatio...原创 2020-04-03 18:05:17 · 165 阅读 · 0 评论 -
CF859C Pie Rules(dp)
CF859C Pie Rulesluogu链接题目描述You may have heard of the pie rule before. It states that if two people wish to fairly share a slice of pie, one person should cut the slice in half, and the other person...原创 2020-04-03 16:53:10 · 303 阅读 · 0 评论 -
CF761C Dasha and Password(线性dp)
洛谷链接https://www.luogu.com.cn/problem/CF761C题目大意给n个字符串,每个长m,初始光标都在每个字符串的开头位置,通过移动光标,从n个字符串中各选择一个字符,构成密码,(移动光标时把长度为m的字符串当做一个环),密码必须满足有至少一个小写字母,至少一个数字,至少一个其他字符(# & *),求最小移动次数。数据范围3<=n<=50,...原创 2020-03-31 16:33:11 · 232 阅读 · 0 评论 -
Zoj-4019 Schrödinger's Knapsack(线性dp)
Schrödinger’s KnapsackTime Limit: 1000 ms Memory Limit: 65536 KB链接zoj 4019题目描述有两类物品,价值分别为k1,k2,数量分别为n,m,给出每个物品占用的体积,每件物品放入背包的价值是放入背包后,k * 当前剩余体积。求这个背包所能装入的最大价值。Input包含T组数据。第一行给出k1,k2和背包容量c。第二...原创 2020-03-23 13:31:38 · 168 阅读 · 0 评论 -
Zoj 4027 Sequence Swapping (线性dp)
Sequence SwappingTime Limit: 1000 ms Memory Limit: 65536 KB题意给出一个括号序列,每个括号对应一个值,当相邻两个括号k为’ ( ‘,k+1为’ ) '时可以交换,得到括号对应值乘积的贡献,可以进行任意次数的交换,求得到的最大贡献值。范围( 1 ≤ n ≤ 10^3 , −10 ^ 3 ≤ vi ≤ 10 ^ 3 )...原创 2020-03-17 11:57:02 · 824 阅读 · 0 评论 -
Codeforces Round #627 (Div. 3) E - Sleeping Schedule (线性dp)
**E - Sleeping Schedule **题目描述Vova had a pretty weird sleeping schedule. There are h hours in a day. Vova will sleep exactly n times. The i-th time he will sleep exactly after ai hours from the time...原创 2020-03-14 09:43:14 · 368 阅读 · 0 评论 -
POJ 3616 Milking Time 线性dp
Milking Time (基础dp)题目描述Bessie is such a hard-working cow. In fact, she is so focused on maximizing her productivity that she decides to schedule her next N (1 ≤ N ≤ 1,000,000) hours (conveniently la...原创 2020-03-13 18:44:38 · 137 阅读 · 0 评论