动态规划
bekote
这个作者很懒,什么都没留下…
展开
-
动态规划 || 多维
A Mini LocomotiveA train has a locomotive that pulls the train with its many passenger coaches. If the locomotive breaks down, there is no way to pull the train. Therefore, the office of railroads dec...原创 2018-03-10 16:17:58 · 766 阅读 · 0 评论 -
动态规划 || Divisibility(背包变种)
DivisibilityConsider an arbitrary sequence of integers. One can place + or - operators between integers in the sequence, thus deriving different arithmetical expressions that evaluate to different va...原创 2018-03-12 12:25:07 · 208 阅读 · 0 评论 -
动态规划 || 威威猫系列故事——篮球梦 (类似背包)
威威猫系列故事——篮球梦 威威猫十分迷恋篮球比赛,是忠实的NBA球迷,他常常幻想自己那肥硕的身躯也能飞起扣篮。另外,他对篮球教练工作也情有独钟,特别是对比赛的战术,投篮选择方面也是很有研究,下面就是威威猫研究过的一个问题: 一场NBA篮球比赛总共48分钟,假如我们现在已经知道当前比分 A:B,A代表我方的比分,B代表对方的比分,现在比赛还剩下t秒时间。我们简单的认为双方各自进攻一次的时间皆固定...原创 2018-03-12 14:21:53 · 194 阅读 · 0 评论 -
动态规划 || 满足条件不连续子序列长度(两个数组存放结果节约空间)
题目描述 给一个数组 a,长度为 n,若某个子序列中的和为 K 的倍数,那么这个序列被称为“K 序列”。现在要你 对数组 a 求出最长的子序列的长度,满足这个序列是 K 序列。 输入描述:第一行为两个整数 n, K, 以空格分隔,第二行为 n 个整数,表示 a[1] ∼ a[n],1 ≤ n ≤ 105 , 1 ≤ a[i] ≤ 109 , 1 ≤ nK ≤ 107输出描述:输出一个整数表示最长子...原创 2018-04-19 16:24:09 · 298 阅读 · 0 评论 -
补题向 | Bracket Substring(KMP+DP)
F. Bracket Substring 求能够构造的符合要求的,包含s序列,长度为2n的序列数量 #include<stdio.h> #include<vector> #include<algorithm> #include<string.h> #include<iostream> #include<fstrea...原创 2018-08-10 22:56:01 · 270 阅读 · 0 评论