会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
劝君
渭城朝雨浥轻尘,客舍青青柳色新。劝君更尽一杯酒,西出阳关无故人。
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
···
55
下一页
2025年2月10日
严格次大值 一道数列分块入门题 题解
摘要: 目录题目描述输入格式输出格式样例样例输入1样例输出1样例输入2样例输出2说明/提示数据规模与约定题解 题目描述 给你一个长度为 \(n\) 的数列 \(a_1, a_2, \ldots, a_n\)。 接下来有 \(q\) 次操作,操作分为如下两种类型: \(\mathtt{1\ l\ r\ x}\
阅读全文
posted @ 2025-02-10 00:31 quanjun
阅读(62)
评论(0)
推荐(0)
2025年2月1日
洛谷P5318 【深基18.例3】查找文献 题解 简单DFS/BFS
摘要: 题目链接:https://www.luogu.com.cn/problem/P5318 题目大意:求图的dfs序及bfs序。 视频讲解地址:https://www.bilibili.com/video/BV1nuFve9Ecu/ 示例程序: #include <bits/stdc++.h> usin
阅读全文
posted @ 2025-02-01 19:56 quanjun
阅读(58)
评论(0)
推荐(0)
2025年1月13日
CF2055B. Crafting 题解 简单贪心
摘要: 题目链接:https://codeforces.com/contest/2055/problem/B 解题思路: 首先,如果存在至少两个 \(a_i \lt b_i\),就面临一个局面,就是: 我不够问你要,然后你也不够问我要。 此时,如果我借给你那么更不够了,你借给我你就不够了。 所以如果至少存在
阅读全文
posted @ 2025-01-13 03:47 quanjun
阅读(100)
评论(0)
推荐(0)
2025年1月7日
海贼OJ #251. 士兵 题解 排序+中位数(数学思维题)
摘要: 题目链接:https://oj.haizeix.com/problem/251 解题思路: 最短总距离是所有点到中位数的距离之和。 对 \(y\):排序求中位数。 对 \(x\):对 \(x\) 排序,然后对排序后的 \(x_i - i\) 排序,然后求最短距离。 对 \(x_i - i\) 进行处
阅读全文
posted @ 2025-01-07 16:50 quanjun
阅读(119)
评论(0)
推荐(0)
2024年12月31日
AtCoder ABC380D - Strange Mirroring 简单分治
摘要: 题目链接:https://atcoder.jp/contests/abc380/tasks/abc380_d 题目大意: 给定一个字符串 \(S\),该字符串由大写和小写英文字母组成。 我们对 \(S\) 执行 \(10^{100}\) 次以下操作: 首先,通过将 \(S\) 中的大写字母转换为小写
阅读全文
posted @ 2024-12-31 12:20 quanjun
阅读(13)
评论(0)
推荐(0)
2024年12月19日
洛谷P3605 [USACO17JAN] Promotion Counting P 题解 树状数组+树上启发式合并
摘要: 题目链接:https://www.luogu.com.cn/problem/P3605 解题思路: 首先需要离散化一下。 然后就是套 树上启发式合并模板了,期间用树状数组维护一下区间和。 时间复杂度:\(O(n \log^2 n)\)。 示例程序: #include <bits/stdc++.h>
阅读全文
posted @ 2024-12-19 15:33 quanjun
阅读(49)
评论(0)
推荐(0)
2024年12月16日
hdu5755 Gambler Bo 题解 高斯消元解模线性方程组
摘要: 题目链接:https://acm.hdu.edu.cn/showproblem.php?pid=5755 题目大意:略 解题思路:略(因为是模板题) 示例程序: #include <bits/stdc++.h> using namespace std; const int maxn = 33 * 3
阅读全文
posted @ 2024-12-16 18:42 quanjun
阅读(44)
评论(0)
推荐(0)
2024年12月15日
洛谷P3389 【模板】高斯消元法 高斯消元模板题
摘要: 题目链接:https://www.luogu.com.cn/problem/P3389 题目大意:略 解题思路:略(因为是模板题) 示例程序: #include <bits/stdc++.h> using namespace std; const int maxn = 110; const doub
阅读全文
posted @ 2024-12-15 17:25 quanjun
阅读(32)
评论(0)
推荐(0)
POJ1681 Painter's Problem 题解 高斯消元法解异或方程组
摘要: 题目链接:http://poj.org/problem?id=1681 题目大意:略 解题思路:略(因为是模板题) 示例程序: #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using na
阅读全文
posted @ 2024-12-15 17:25 quanjun
阅读(23)
评论(0)
推荐(0)
2024年12月14日
洛谷P2089 烤鸡 题解 递归
摘要: 题目链接:https://www.luogu.com.cn/problem/P2089 题目大意: 有 \(10\) 种配料,每种配料可以放 \(1 \sim 3\) 克。现在要凑成共 \(n\) 克的配料。问: 有多少种不同的方案? 按字典序从小到大输出所有方案。 解题思路: 我们可以设计一个递归
阅读全文
posted @ 2024-12-14 03:55 quanjun
阅读(165)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
···
55
下一页
公告