
dp
Amo-
某弱校 垃圾 ,,
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
https://ac.nowcoder.com/acm/contest/317/D
链接:https://ac.nowcoder.com/acm/contest/317/C 来源:牛客网 小a与星际探索 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 小a正在玩一款星际探索游戏,小a需要驾驶着飞船从11号星球出发前往nn号星球。其中每个星球有一个能量指数pp。星球...原创 2019-02-21 23:26:01 · 22783 阅读 · 0 评论 -
Educational Codeforces Round 63 (Rated for Div. 2) A B C D (贪心 + 思维 + dp)
A. Reverse a Substring time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a stringssconsisting ofnnlowercase Latin...原创 2019-04-23 03:57:28 · 467 阅读 · 0 评论 -
桂林电子科技大学第三届ACM程序设计竞赛(LCA、dp、树形dp、后缀数组、贪心)
链接:https://ac.nowcoder.com/acm/contest/558#question A:后缀数组模板题 B:map标记一下 C: 链接:https://ac.nowcoder.com/acm/contest/558/C 来源:牛客网 题目描述 小猫在研究二元组。 小猫在研究最大值。 给定N个二元组(a1,b1),(a2,b2),…,(aN,bN),请你从中选出恰...原创 2019-04-15 15:06:33 · 765 阅读 · 0 评论 -
Codeforces Round #552 (Div. 3) A B C D E F G (暴力,dp,模拟)
题目链接:https://codeforces.com/contest/1154 A:Restoring Three Numbers B:Make Them Equal C:Gourmet Cat D:Walking Robot E:Two Teams F:Shovels Shop G:Minimum Possible LCM A:给定b-a、a+c、b+c、a+b+c的值求ab...原创 2019-04-17 03:02:22 · 375 阅读 · 0 评论 -
牛客网删括号
链接:https://ac.nowcoder.com/acm/problem/21303 来源:牛客网 删括号 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 524288K,其他语言1048576K 64bit IO Format: %lld 题目描述 给你一个合法的括号序列s1,每次你可以删除一个"()" 你可以删除0个或者多个"()" 求能否删成另一个括号序列s2...原创 2019-04-15 20:10:29 · 1020 阅读 · 0 评论 -
51nod 1154 回文串划分 2019/03/25
1154 回文串划分 1 秒 131,072 KB 40 分 4 级题 有一个字符串S,求S最少可以被划分为多少个回文串。 例如:abbaabaa,有多种划分方式。 a|bb|aabaa - 3 个回文串 a|bb|a|aba|a - 5 个回文串 a|b|b|a|a|b|a|a - 8 个回文串 其中第1种划分方式的划分数量最少。 收起 输入...原创 2019-03-25 17:34:42 · 225 阅读 · 0 评论 -
codeforces 219D - Choosing Capital for Treeland (树形dp)
D. Choosing Capital for Treeland time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output The country Treeland consists ofncities, some ...原创 2019-03-13 14:36:04 · 253 阅读 · 0 评论 -
51nod 1086 背包问题 V2 2019/03/06
1 秒 131,072 KB 40 分 4 级题 有N种物品,每种物品的数量为C1,C2......Cn。从中任选若干件放在容量为W的背包里,每种物品的体积为W1,W2......Wn(Wi为整数),与之相对应的价值为P1,P2......Pn(Pi为整数)。求背包能够容纳的最大价值。 收起 输入 第1行,2个整数,N和W中间用空格隔开。N为物品的种类,W为背包的...原创 2019-03-06 16:45:14 · 163 阅读 · 0 评论 -
51nod 1051 最大子矩阵和 2019/03/05
传送门:https://www.51nod.com/Challenge/Problem.html#!#problemId=1051 一个M*N的矩阵,找到此矩阵的一个子矩阵,并且这个子矩阵的元素的和是最大的,输出这个最大的值。 例如:3*3的矩阵: -1 3 -1 2 -1 3 -3 1 2 和最大的子矩阵是: 3 -1 -1 3 1 2 收起 输入 ...原创 2019-03-05 13:50:39 · 174 阅读 · 0 评论 -
2019年湘潭大学程序设计竞赛(重现赛)H题 前缀和+分组背包
链接:https://ac.nowcoder.com/acm/contest/893/H 来源:牛客网 Chat 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 在Casya生活的世界里,一天由m个小时组成。 最近Casya的女神终于答应在接下来的n天中与Casya聊天,Casya...原创 2019-05-05 14:58:49 · 409 阅读 · 0 评论