
动态规划
Virtualllll
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
动态规划入门-完全背包(硬币兑换问题)
C - 完全背包 在一个国家仅有1分,2分,3分硬币,将钱N兑换成硬币有很多种兑法。请你编程序计算出共有多少种兑法。Input每行只有一个正整数N,N小于32768。Output对应每个输入,输出兑换方法数。Sample Input2934 12553Sample Output718831 13137761Time limit1000 msMemory limit32768 kBOSWindows...原创 2018-04-01 18:11:00 · 3001 阅读 · 0 评论 -
Necklace-(状态压缩&&位运算)
B - Necklace #include<iostream> #include<stdio.h> #include<string.h> typedef long long LL; using namespace std; int n,m; int v[20][20]; LL dp[(1<<18)+1][20]; int main() { ...原创 2018-06-27 09:26:43 · 290 阅读 · 0 评论 -
Doing Homework (状态DP&&位运算)
Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in the homework after th...原创 2018-06-27 09:26:17 · 326 阅读 · 0 评论 -
POJ-1185 炮兵阵地(状态DP&&位运算)
炮兵阵地Time Limit: 2000MS Memory Limit: 65536KTotal Submissions: 31553 Accepted: 12180Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队...原创 2018-06-27 16:22:02 · 259 阅读 · 0 评论