会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
26
27
28
29
30
31
32
33
34
···
45
下一页
2024年3月18日
P8626 [蓝桥杯 2015 省 A] 灾后重建
摘要: 根号分治之类的思路分析这里就不讲了,主要关注代码细节: #include <iostream> #include <stdio.h> #include <algorithm> #include <vector> #include <string> #include <cmath> #define F
阅读全文
posted @ 2024-03-18 23:01 Gold_stein
阅读(29)
评论(0)
推荐(0)
2024年3月15日
P2495 [SDOI2011] 消耗战
摘要: #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #include <vector> #include <cstring> #include <queue> #include <cmath> #
阅读全文
posted @ 2024-03-15 14:57 Gold_stein
阅读(5)
评论(0)
推荐(0)
2024年3月13日
Acwing255.第k小数
摘要: 可持久化权值线段树 #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #include <cmath> #include <cstring> #include <vector> #define
阅读全文
posted @ 2024-03-13 16:37 Gold_stein
阅读(12)
评论(0)
推荐(0)
2024年3月11日
256. 最大异或和
摘要: 可持久化字典树 #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #include <cmath> #define For(i, j, n) for(int i = j ; i <= n ; +
阅读全文
posted @ 2024-03-11 21:25 Gold_stein
阅读(11)
评论(0)
推荐(0)
P8684 [蓝桥杯 2019 省 B] 灵能传输
摘要: 这道题出得很妙。 首先,对原数组求前缀和,然后我们能够发现,对ai进行操作就相当于交换(s[i],s[i-1]),然后就把原问题转化成维护一个先下凸,后上凸的双峰函数。 #include <iostream> #include <stdio.h> #include <algorithm> #incl
阅读全文
posted @ 2024-03-11 10:46 Gold_stein
阅读(23)
评论(0)
推荐(0)
2024年3月9日
[蓝桥杯 2019 省 B] 后缀表达式
摘要: 这题没想到怎么贪心,看题解恍然大明白 #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #define For(i, j, n) for(int i = j ; i <= n ; ++i) us
阅读全文
posted @ 2024-03-09 20:58 Gold_stein
阅读(18)
评论(0)
推荐(0)
[蓝桥杯 2019 省 B] 等差数列
摘要: 实际上这道题不需要先排序再求gcd,因为无论是哪两项之前作差,都不会影响最后的gcd的结果。 因为公差是从a2-a1开始算的,因此i=1时要特殊处理,不能把a1-0计入贡献,否则会算出错误的gcd。 即作差时不要加上a1-0,统计最值时不要漏掉a1 #include <iostream> #incl
阅读全文
posted @ 2024-03-09 20:43 Gold_stein
阅读(50)
评论(0)
推荐(0)
2024年3月7日
1277. 维护序列
摘要: #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #define For(i, j, n) for(int i = j ; i <= n ; ++i) using namespace std;
阅读全文
posted @ 2024-03-07 08:52 Gold_stein
阅读(12)
评论(0)
推荐(0)
2024年3月5日
243. 一个简单的整数问题2
摘要: #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #define For(i, j, n) for(int i = j ; i <= n ; ++i) using namespace std;
阅读全文
posted @ 2024-03-05 15:33 Gold_stein
阅读(9)
评论(0)
推荐(0)
2024年3月4日
P8681 [蓝桥杯 2019 省 AB] 完全二叉树的权值
摘要: 做这道题的时候混淆了满二叉树和完全二叉树的概念: 满二叉树:顾名思义,就是塞满了 完全二叉树:除了最后一层之外,每一层都必须是满的,且最后一层如果不满,则所有节点都尽可能靠左。 #include <iostream> #include <stdio.h> #include <algorithm> #
阅读全文
posted @ 2024-03-04 12:17 Gold_stein
阅读(61)
评论(0)
推荐(0)
上一页
1
···
26
27
28
29
30
31
32
33
34
···
45
下一页
公告