• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
Codjjj
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

随笔分类 -  dp

 
树上dfs+分组背包
摘要:有依赖的背包问题 Code: #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 110; int n,V; int f[N][N];//f[i][j]表示以i为 阅读全文
posted @ 2021-09-16 08:49 _Codjjj 阅读(40) 评论(0) 推荐(0)
货币系统(完全背包)
摘要:货币系统 #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 110,M=25010; int n,m; int a[N];//货币 bool f[M];//dp 阅读全文
posted @ 2021-09-14 23:31 _Codjjj 阅读(34) 评论(0) 推荐(0)
混合背包问题+二进制优化
摘要:混合背包问题 #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 1010; int f[N]; int n,m; int main(){ cin>>n>>m; 阅读全文
posted @ 2021-09-10 15:27 _Codjjj 阅读(34) 评论(0) 推荐(0)
三进制状压dp
摘要:#define _CRT_SECURE_NO_WARNINGS #include<bits/stdc++.h> #define ull unsigned long long using namespace std; const int INF = 0x3f3f3f3f,M=27*27*27-1; i 阅读全文
posted @ 2021-09-01 11:29 _Codjjj 阅读(61) 评论(0) 推荐(0)
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3