随笔分类 - 动态规划
摘要:题目链接: "https://leetcode.com/problems/count different palindromic subsequences/description/" 730.Count Different Palindromic Subsequences 题意 给你一个只包含a、b
阅读全文
摘要:题目链接: "https://leetcode.com/problems/remove boxes/description/" 问题描述 若干个有序排列的box和它们的颜色,每次可以移除若干个连续的颜色相同的box,且得分为移除个数的平方,求最大的得分。 n不超过100. 输入 输入n个箱子的颜色。
阅读全文
摘要:题目链接: "LeetCode 638 Shopping Offers" 题解 dynamic programing 需要用到进制转换来表示状态,或者可以直接用一个vector来保存状态。 代码 1、未优化,超时代码: class Solution { public: int max(int x,i
阅读全文
摘要:题目链接: "http://acm.hdu.edu.cn/showproblem.php?pid=1171" Big Event in HDU Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Othe
阅读全文
摘要:题目链接: "http://acm.hdu.edu.cn/showproblem.php?pid=3401" Trade Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) 问题描述 Rece
阅读全文
摘要:题目链接: "http://acm.hdu.edu.cn/showproblem.php?pid=5115" Dire Wolf Time Limit: 5000/5000 MS (Java/Others)Memory Limit: 512000/512000 K (Java/Others) 问题描
阅读全文
摘要:题目链接: "http://codeforces.com/problemset/problem/6/D" D. Lizards and Basements 2 time limit per test2 secondsmemory limit per test64 megabytes 问题描述 Thi
阅读全文
摘要:题目链接: "http://acm.hdu.edu.cn/showproblem.php?pid=4281" Judges' response Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others
阅读全文
摘要:题目链接: "http://acm.hdu.edu.cn/showproblem.php?pid=4026" Unlock the Cell Phone Time Limit: 6000/3000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/O
阅读全文
摘要:题目链接: "http://poj.org/problem?id=2441" Arrange the Bulls Time Limit: 4000MSMemory Limit: 65536K 问题描述 Farmer Johnson's Bulls love playing basketball ve
阅读全文
摘要:题目链接: "http://acm.hdu.edu.cn/showproblem.php?pid=3811" Permutation Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) 问题
阅读全文
摘要:题目链接: "http://acm.hdu.edu.cn/showproblem.php?pid=4529" 郑厂长系列故事——N骑士问题 Time Limit: 6000/3000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)
阅读全文
摘要:题目链接: "http://acm.hdu.edu.cn/showproblem.php?pid=4539" 郑厂长系列故事——排兵布阵 Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)
阅读全文
摘要:题目链接: "http://poj.org/problem?id=1185" 炮兵阵地 Time Limit: 2000MS Memory Limit: 65536K 问题描述 司令部的将军们打算在 的网格地图上部署他们的炮兵部队。一个 的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示)
阅读全文
摘要:题目链接: "http://acm.hdu.edu.cn/showproblem.php?pid=4568" Hunter Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) 问题描述 One
阅读全文
摘要:题目链接: "http://acm.hdu.edu.cn/showproblem.php?pid=1565" 方格取数(1) Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) 问题描述
阅读全文
摘要:题目链接: "http://acm.hdu.edu.cn/showproblem.php?pid=1693" Eat the Trees Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) 问
阅读全文
摘要:题目链接: "http://poj.org/problem?id=2411" Mondriaan's Dream Time Limit: 3000MSMemory Limit: 65536K 问题描述 Squares and rectangles fascinated the famous Dutc
阅读全文
摘要:题目链接: "http://poj.org/problem?id=2151" Check the difficulty of problems Time Limit: 2000MSMemory Limit: 65536K 问题描述 Organizing a programming contest i
阅读全文
摘要:题目链接: "http://codeforces.com/problemset/problem/148/D" D. Bag of mice time limit per test2 secondsmemory limit per test256 megabytes 问题描述 The dragon a
阅读全文

浙公网安备 33010602011771号