04 2023 档案

摘要:视频链接:458 单调队列优化DP 股票交易_哔哩哔哩_bilibili Luogu P2569 [SCOI2010]股票交易 时间:O(T*P) #include <iostream> #include <cstring> #include <algorithm> using namespace 阅读全文
posted @ 2023-04-29 14:20 董晓 阅读(302) 评论(0) 推荐(0) 编辑
摘要:视频链接:457 单调队列优化DP 瑰丽华尔兹_哔哩哔哩_bilibili Luogu P2254 [NOI2005] 瑰丽华尔兹 时间:O(KNM) #include<cstdio> #include<cstring> #include<iostream> #define N 205 using 阅读全文
posted @ 2023-04-29 14:18 董晓 阅读(257) 评论(0) 推荐(0) 编辑
摘要:视频链接:456 单调队列优化DP Watching Fireworks is Fun_哔哩哔哩_bilibili CF372C Watching Fireworks is Fun 时间:O(nm) #include <iostream> #include <cstring> #include <a 阅读全文
posted @ 2023-04-29 14:16 董晓 阅读(256) 评论(0) 推荐(0) 编辑
摘要:视频链接:455 单调队列优化DP 旅行问题_哔哩哔哩_bilibili LOJ10178 旅行问题 #include<iostream> using namespace std; typedef long long LL; const int N=2e6+10; int n,oil[N],dis[ 阅读全文
posted @ 2023-04-29 14:13 董晓 阅读(317) 评论(0) 推荐(0) 编辑
摘要:视频链接:454 单调队列优化DP 琪露诺_哔哩哔哩_bilibili Luogu P1725 琪露诺 #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N=2e5+1 阅读全文
posted @ 2023-04-29 14:08 董晓 阅读(302) 评论(0) 推荐(0) 编辑
摘要:视频链接:453 单调队列优化DP 绿色通道_哔哩哔哩_bilibili LOJ10181 绿色通道 #include<iostream> using namespace std; const int N=5e4+10; int n,tim,w[N],f[N],q[N]; bool check(in 阅读全文
posted @ 2023-04-23 14:59 董晓 阅读(256) 评论(0) 推荐(0) 编辑
摘要:视频链接:452 单调队列优化DP 修剪草坪_哔哩哔哩_bilibili LOJ10177 修剪草坪 #include <iostream> #include <cstring> #include <algorithm> using namespace std; typedef long long 阅读全文
posted @ 2023-04-23 14:57 董晓 阅读(293) 评论(0) 推荐(0) 编辑
摘要:视频链接:451 单调队列优化DP 烽火传递_哔哩哔哩_bilibili E11【模板】单调队列 滑动窗口最值 - 董晓 - 博客园 (cnblogs.com) LOJ10180 烽火传递 #include <iostream> #include <cstring> #include <algori 阅读全文
posted @ 2023-04-23 14:56 董晓 阅读(402) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1kP411m7xv/ Luogu P3232 [HNOI2013]游走 时间:O(n^3+mlogm) #include<cmath> #include<cstring> #include<iostream> #inclu 阅读全文
posted @ 2023-04-20 23:24 董晓 阅读(385) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1ZT411n7AT/ Luogu P4316 绿豆蛙的归宿 #include <cstring> #include <iostream> #include <algorithm> using namespace std; 阅读全文
posted @ 2023-04-20 23:22 董晓 阅读(309) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1Wh4y1p7Zg/ POJ2096 Collecting Bugs 题意: 一个软件有s个子系统,会产生n种bug 某人一天发现一个bug,这个bug属于一个子系统,属于一个分类 每个bug属于某个子系统的概率是1/s, 阅读全文
posted @ 2023-04-14 16:42 董晓 阅读(450) 评论(0) 推荐(0) 编辑
摘要:视频链接: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 董晓 阅读(431) 评论(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 董晓 阅读(475) 评论(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 董晓 阅读(553) 评论(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 董晓 阅读(673) 评论(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 董晓 阅读(523) 评论(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 董晓 阅读(377) 评论(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 董晓 阅读(655) 评论(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 董晓 阅读(727) 评论(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 董晓 阅读(590) 评论(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 董晓 阅读(408) 评论(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 董晓 阅读(491) 评论(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 董晓 阅读(657) 评论(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 董晓 阅读(631) 评论(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 董晓 阅读(656) 评论(2) 推荐(1) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1pf4y1q7hU/ Luogu P1896 [SCOI2005] 互不侵犯 在N×N的棋盘里面放K个国王,使他们互不攻击,共有多少种摆放方案。国王能攻击到它上下左右,以及左上左下右上右下八个方向上附近的各一个格子,共8个 阅读全文
posted @ 2023-04-10 10:11 董晓 阅读(834) 评论(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 董晓 阅读(306) 评论(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 董晓 阅读(366) 评论(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 董晓 阅读(423) 评论(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 董晓 阅读(453) 评论(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 董晓 阅读(403) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV16K411A7iC/ // 不超背包容量的方案数 #include<iostream> #include<cstring> using namespace std; const int N=1010, mod=1e9+7; 阅读全文
posted @ 2023-04-10 10:04 董晓 阅读(480) 评论(0) 推荐(1) 编辑
摘要:视频链接:E18【模板】树上背包 P2014 [CTSC1997] 选课_哔哩哔哩_bilibili 题意:有 n 个物品和一个容量是 V 的背包。物品之间具有依赖关系,构成一棵树。如果选择一个物品,则必须选择它的父节点。 思路:在树上做背包DP 以每个结点为根的子树看做一个物品组,可能选择:只选根 阅读全文
posted @ 2023-04-10 10:03 董晓 阅读(1016) 评论(0) 推荐(0) 编辑
摘要:视频链接:E17【模板】树形DP P1352 没有上司的舞会_哔哩哔哩_bilibili P1352 没有上司的舞会 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn) #include <iostream> #include <cstring> #include <algorithm 阅读全文
posted @ 2023-04-10 10:02 董晓 阅读(736) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV16a411w77X/ // 分组背包 朴素算法 #include<iostream> #include<cstring> using namespace std; const int N=110; int v[N][N], 阅读全文
posted @ 2023-04-10 10:01 董晓 阅读(629) 评论(1) 推荐(2) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1P54y1C7Ew/ //二维费用 01背包 #include <iostream> using namespace std; int f[110][110]; // f[j,k]:前i个物品,体积≤j,重量≤k 的最大价 阅读全文
posted @ 2023-04-10 09:59 董晓 阅读(419) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1nV41127ZU/ #include <iostream> using namespace std; const int N=1010,M=10000; int a[M],b[M],c[M]; int f[N]; int 阅读全文
posted @ 2023-04-10 09:58 董晓 阅读(554) 评论(0) 推荐(1) 编辑
摘要:视频链接:E13 背包DP 多重背包 单调队列优化——信息学奥赛算法_哔哩哔哩_bilibili E11【模板】单调队列 滑动窗口最值 - 董晓 - 博客园 Luogu P1776 宝物筛选 // 单调队列 O(n*W) #include <iostream> #include <cstring> 阅读全文
posted @ 2023-04-10 09:57 董晓 阅读(792) 评论(0) 推荐(1) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1m54y117uu/ E11【模板】单调队列 滑动窗口最值 - 董晓 - 博客园 (cnblogs.com) LOJ10176 最大连续和 f[i]表示选第 i 个数,且长度不超过m的最大连续和f[i] = max(s[i 阅读全文
posted @ 2023-04-10 09:56 董晓 阅读(605) 评论(0) 推荐(0) 编辑
摘要:视频链接:E11【模板】单调队列 滑动窗口最值_哔哩哔哩_bilibili Luogu P1886 滑动窗口 /【模板】单调队列 #include <iostream> using namespace std; const int N=1000010; int a[N], q[N]; int mai 阅读全文
posted @ 2023-04-10 09:24 董晓 阅读(1109) 评论(0) 推荐(3) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1MA41177cg/ #include <iostream> #include <algorithm> using namespace std; const int N=210; int n, m; int v[N], w 阅读全文
posted @ 2023-04-10 09:23 董晓 阅读(757) 评论(1) 推荐(0) 编辑
摘要:视频链接:409【模板】背包DP 完全背包_哔哩哔哩_bilibili // 朴素算法 TLE #include <iostream> #include <algorithm> using namespace std; const int N=1010; int n, m; int v[N], w[ 阅读全文
posted @ 2023-04-10 09:22 董晓 阅读(700) 评论(0) 推荐(2) 编辑
摘要:视频链接:E08【模板】背包DP 01背包_哔哩哔哩_bilibili Luogu P2871 [USACO07DEC]Charm Bracelet S // 朴素算法 MLE #2 #10 #include <iostream> #include <cstring> #include <algor 阅读全文
posted @ 2023-04-10 09:20 董晓 阅读(986) 评论(0) 推荐(1) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1gk4y1177j/ Luogu P2758 编辑距离 #include<iostream> #include<cstring> #include<algorithm> using namespace std; char 阅读全文
posted @ 2023-04-10 09:19 董晓 阅读(636) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1hv41117gC/ #include<iostream> #include<cstring> using namespace std; char a[200]="BCCABCCB"; char b[200]="AACCA 阅读全文
posted @ 2023-04-10 09:17 董晓 阅读(567) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1EK411K7Eb/ #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N=1010; i 阅读全文
posted @ 2023-04-09 23:12 董晓 阅读(741) 评论(0) 推荐(0) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1Kp4y1e77H/ #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N=100010; 阅读全文
posted @ 2023-04-09 22:25 董晓 阅读(749) 评论(1) 推荐(2) 编辑
摘要:视频链接:https://www.bilibili.com/video/BV1KK4y1e7t7/ #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N=1010; i 阅读全文
posted @ 2023-04-09 22:24 董晓 阅读(640) 评论(0) 推荐(1) 编辑
摘要:视频链接:E02 线性DP 数字三角形_哔哩哔哩_bilibili Luogu P1216 [USACO1.5][IOI1994]数字三角形 Number Triangles #include <iostream> #include <cstring> #include <algorithm> us 阅读全文
posted @ 2023-04-09 18:45 董晓 阅读(561) 评论(0) 推荐(1) 编辑
摘要:视频链接:E01 记忆化搜索 数字三角形_哔哩哔哩_bilibili Luogu P1216 [USACO1.5][IOI1994]数字三角形 Number Triangles #include <iostream> #include <cstring> #include <algorithm> u 阅读全文
posted @ 2023-04-09 18:44 董晓 阅读(637) 评论(1) 推荐(0) 编辑

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