上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 57 下一页
摘要: 题目链接:https://codeforces.com/contest/2055/problem/B 解题思路: 首先,如果存在至少两个 \(a_i \lt b_i\),就面临一个局面,就是: 我不够问你要,然后你也不够问我要。 此时,如果我借给你那么更不够了,你借给我你就不够了。 所以如果至少存在 阅读全文
posted @ 2025-01-13 03:47 quanjun 阅读(108) 评论(0) 推荐(0)
摘要: 题目链接:https://oj.haizeix.com/problem/251 解题思路: 最短总距离是所有点到中位数的距离之和。 对 \(y\):排序求中位数。 对 \(x\):对 \(x\) 排序,然后对排序后的 \(x_i - i\) 排序,然后求最短距离。 对 \(x_i - i\) 进行处 阅读全文
posted @ 2025-01-07 16:50 quanjun 阅读(126) 评论(0) 推荐(0)
摘要: 题目链接:https://atcoder.jp/contests/abc380/tasks/abc380_d 题目大意: 给定一个字符串 \(S\),该字符串由大写和小写英文字母组成。 我们对 \(S\) 执行 \(10^{100}\) 次以下操作: 首先,通过将 \(S\) 中的大写字母转换为小写 阅读全文
posted @ 2024-12-31 12:20 quanjun 阅读(15) 评论(0) 推荐(0)
摘要: 题目链接:https://www.luogu.com.cn/problem/P3605 解题思路: 首先需要离散化一下。 然后就是套 树上启发式合并模板了,期间用树状数组维护一下区间和。 时间复杂度:\(O(n \log^2 n)\)。 示例程序: #include <bits/stdc++.h> 阅读全文
posted @ 2024-12-19 15:33 quanjun 阅读(55) 评论(0) 推荐(0)
摘要: 题目链接: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 阅读(45) 评论(0) 推荐(0)
摘要: 题目链接: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 阅读(36) 评论(0) 推荐(0)
摘要: 题目链接:http://poj.org/problem?id=1681 题目大意:略 解题思路:略(因为是模板题) 示例程序: #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using na 阅读全文
posted @ 2024-12-15 17:25 quanjun 阅读(24) 评论(0) 推荐(0)
摘要: 题目链接:https://www.luogu.com.cn/problem/P2089 题目大意: 有 \(10\) 种配料,每种配料可以放 \(1 \sim 3\) 克。现在要凑成共 \(n\) 克的配料。问: 有多少种不同的方案? 按字典序从小到大输出所有方案。 解题思路: 我们可以设计一个递归 阅读全文
posted @ 2024-12-14 03:55 quanjun 阅读(177) 评论(0) 推荐(0)
摘要: 首先,我们需要打开 Edge 浏览器并登录 洛谷 并且确保你已经登录了洛谷的账号,像这样: 然后按 F12 按钮打开 Edge 的开发人员工具(可能会问你是否打开开发人员工具,选择“是”) 在开发工具中找到 “应用程序”,如下(我这里是点击了 “+” 号,然后再找到“应用程序”的): 点击应用程序后 阅读全文
posted @ 2024-12-11 21:13 quanjun 阅读(296) 评论(0) 推荐(0)
摘要: 题目链接:http://codeforces.com/problemset/problem/1111/D 题目大意: 有一个恶棍的聚居地由几个排成一排的洞穴组成,每一个洞穴恰好住着一个恶棍。 每种聚居地的分配方案可以记作一个长为偶数的字符串,第\(i\)个字符代表第\(i\)个洞里的恶棍的类型。 如 阅读全文
posted @ 2024-12-05 02:16 quanjun 阅读(38) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 57 下一页