随笔分类 -  E 动态规划

摘要:视频链接:https://www.bilibili.com/video/BV1Ng4y177tX/ CF148D Bag of mice 状态:f[i][j]表示袋中有i只白鼠j只黑鼠时,A获胜的概率 起点:f[0][i]=0,f[i][0]=1终点:f[w][b] 转移:1.先手拿到白鼠:f[i] 阅读全文
posted @ 2023-04-14 14:37 董晓 阅读(434) 评论(0) 推荐(1) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1Ff4y1e7YW/ #include<bits/stdc++.h> using namespace std; const int N=34; int a[N]; //把B进制数的每一位抠出存入数组 int f[N][N] 阅读全文
posted @ 2023-04-10 10:23 董晓 阅读(478) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1fa4y1H7J6/ Luogu P2657 [SCOI2009] windy 数 #include <bits/stdc++.h> using namespace std; const int N = 12; int a 阅读全文
posted @ 2023-04-10 10:22 董晓 阅读(556) 评论(0) 推荐(2) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1fy4y1q79f/ #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N=12; int 阅读全文
posted @ 2023-04-10 10:21 董晓 阅读(683) 评论(0) 推荐(1) 编辑
摘要:视频链接:E34 树形DP 树的中心_哔哩哔哩_bilibili #include <iostream> #include <cstring> #include <algorithm> #include <vector> using namespace std; const int N=20010; 阅读全文
posted @ 2023-04-10 10:20 董晓 阅读(529) 评论(0) 推荐(0) 编辑
摘要:视频链接:E35 树形DP 积蓄程度_哔哩哔哩_bilibili 3585 -- Accumulation Degree #include <iostream> #include <cstring> #include <algorithm> using namespace std; const in 阅读全文
posted @ 2023-04-10 10:20 董晓 阅读(382) 评论(0) 推荐(0) 编辑
摘要:视频链接:E33 树形DP 树的直径_哔哩哔哩_bilibili #include <cstring> #include <iostream> #include <algorithm> #include <vector> using namespace std; const int N=100010 阅读全文
posted @ 2023-04-10 10:19 董晓 阅读(664) 评论(3) 推荐(1) 编辑
摘要:视频链接:E32 树形DP 树的重心_哔哩哔哩_bilibili #include <iostream> #include <cstring> #include <algorithm> #include <vector> using namespace std; const int N=100010 阅读全文
posted @ 2023-04-10 10:18 董晓 阅读(737) 评论(0) 推荐(1) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1cv411b7EG/ HDU1400 Mondriaan's Dream #include <iostream> #include <cstring> #include <algorithm> using namespac 阅读全文
posted @ 2023-04-10 10:17 董晓 阅读(594) 评论(0) 推荐(1) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV19t4y1a7xF/ Luogu P1063 [NOIP2006 提高组] 能量项链 #include <iostream> #include <cstring> #include <algorithm> using na 阅读全文
posted @ 2023-04-10 10:16 董晓 阅读(410) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1oK4y1j7W3/ Luogu P1880 [NOI1995] 石子合并 #include <iostream> #include <cstring> #include <algorithm> using namespa 阅读全文
posted @ 2023-04-10 10:15 董晓 阅读(496) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1gz4y1y7Rv/ Luogu P1775 石子合并(弱化版) #include <iostream> #include <cstring> #include <algorithm> using namespace st 阅读全文
posted @ 2023-04-10 10:14 董晓 阅读(664) 评论(0) 推荐(1) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1vy4y1z7qy/ Luogu P2704 [NOI2001] 炮兵阵地 #include <iostream> #include <cstring> #include <algorithm> using namespa 阅读全文
posted @ 2023-04-10 10:13 董晓 阅读(634) 评论(0) 推荐(2) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1BA411j7Qv/ Luogu P1879 [USACO06NOV]Corn Fields(玉米田) POJ3254 Corn Fields #include <iostream> #include <cstring> 阅读全文
posted @ 2023-04-10 10:12 董晓 阅读(658) 评论(2) 推荐(1) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1pf4y1q7hU/ Luogu P1896 [SCOI2005] 互不侵犯 在N×N的棋盘里面放K个国王,使他们互不攻击,共有多少种摆放方案。国王能攻击到它上下左右,以及左上左下右上右下八个方向上附近的各一个格子,共8个 阅读全文
posted @ 2023-04-10 10:11 董晓 阅读(843) 评论(0) 推荐(2) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV15v411r7WD/ #include <iostream> #include <cstring> using namespace std; const int N = 100010; int w[N],f[N][2]; 阅读全文
posted @ 2023-04-10 10:10 董晓 阅读(308) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1ka4y1s7ER/ #include<iostream> #include<cstring> using namespace std; const int N=100010, M=110; int w[N], f[N][ 阅读全文
posted @ 2023-04-10 10:09 董晓 阅读(371) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1iK4y177jT/ #include<iostream> #include<cstring> using namespace std; const int N = 100010; int w[N],f[N][2]; in 阅读全文
posted @ 2023-04-10 10:08 董晓 阅读(427) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1TK4y1E7ft/ // 分步转移 #include<iostream> using namespace std; const int N=100010; int w[N],f[N]; int main(){ int n 阅读全文
posted @ 2023-04-10 10:06 董晓 阅读(461) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1454y1C7AR/ #include<iostream> #include<cstring> using namespace std; const int N = 1010; int v[N],w[N]; int f[N 阅读全文
posted @ 2023-04-10 10:05 董晓 阅读(412) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示