会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
24
25
26
27
28
29
30
31
32
···
45
下一页
2024年4月8日
P9232 [蓝桥杯 2023 省 A] 更小的数
摘要: 暴力 直接暴力枚举区间,并且逐个判断 #include <iostream> #include <stdio.h> #include <algorithm> #include <string.h> #include <string> #include <cmath> #define R(x) x =
阅读全文
posted @ 2024-04-08 10:51 Gold_stein
阅读(45)
评论(0)
推荐(0)
2024年4月7日
P8600 [蓝桥杯 2013 省 B] 连号区间数 and CF526F
摘要: 问题转化 很容易就能把原问题转化成: 求满足 Max-Min = r-l的区间个数 暴力解法 根据上面得到的性质,我们可以暴力枚举区间,来判断当前区间是否满足性质 #include <iostream> #include <stdio.h> #include <algorithm> #include
阅读全文
posted @ 2024-04-07 17:32 Gold_stein
阅读(19)
评论(0)
推荐(0)
ACwing830 单调栈
摘要: 这道题是 P8600 [蓝桥杯 2013 省 B] 连号区间数 的前置知识 #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #include <cmath> #define R(x) x =
阅读全文
posted @ 2024-04-07 16:54 Gold_stein
阅读(7)
评论(0)
推荐(0)
2024年4月3日
将字符串转化为回文串,并记录方案
摘要: #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #include <cmath> #include <string.h> #define R(x) x = read() #define For
阅读全文
posted @ 2024-04-03 22:11 Gold_stein
阅读(30)
评论(0)
推荐(0)
floyd求路径
摘要: #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #include <cmath> #include <string.h> #define R(x) x = read() #define For
阅读全文
posted @ 2024-04-03 22:03 Gold_stein
阅读(7)
评论(0)
推荐(0)
P2831 [NOIP2016 提高组] 愤怒的小鸟
摘要: 思路 状压+优化 代码 #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #include <cmath> #include <string.h> #define R(x) x = read()
阅读全文
posted @ 2024-04-03 11:49 Gold_stein
阅读(20)
评论(0)
推荐(0)
啊米诺斯
摘要: 啊米诺斯1 啊米诺斯 啊米诺斯2 啊米诺斯
阅读全文
posted @ 2024-04-03 10:40 Gold_stein
阅读(136)
评论(0)
推荐(0)
P8776 [蓝桥杯 2022 省 A] 最长不下降子序列
摘要: 1.首先想到的做法 设up_len[i]为以a[i]为结尾的最长不下降子序列的长度,down_len[i]表示以a[i]为开始的最长不下降子序列的长度。 在求pre的过程中记录下额外信息:down_pre[i]表示在求down_len[i]的过程中,i是由哪个点转移过来的; 得到dp的转移方程: i
阅读全文
posted @ 2024-04-03 10:35 Gold_stein
阅读(186)
评论(0)
推荐(0)
2024年4月1日
ACwing291. 蒙德里安的梦想
摘要: 注意: 这道题不能像小国王那样,预处理出一个useful数组,存储所有可用的状态: for(int i = 2; i <= m + 1; i++) for(int j = 0; j < 1<<n; j++) { f[i&1][j] = 0; for(int k:Trans[j]) f[i][j] +
阅读全文
posted @ 2024-04-01 21:32 Gold_stein
阅读(26)
评论(0)
推荐(0)
ACwing1064. 小国王
摘要: 线性状压DP #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #include <cmath> #include <vector> #define R(x) x = read() #defin
阅读全文
posted @ 2024-04-01 19:11 Gold_stein
阅读(16)
评论(0)
推荐(0)
上一页
1
···
24
25
26
27
28
29
30
31
32
···
45
下一页
公告