Goldminer
Goldminer
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Goldminer的博客
全部文章
(共25篇)
题解 | 小红的双生英雄
#include <iostream> #include <vector> #include <algorithm> using namespace std; // 定义英雄结构体,存储每个英雄的 cost 和 power struct Hero { i...
2025-04-23
0
22
题解 | 小红的双生英雄
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Hero { int cost; long long power; };...
2025-04-23
0
16
题解 | 而后单调
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 10; int a[N], b[N]; int n, m; map<int, int> posMap; // 判断数组中是否存在重复元素 b...
2025-04-23
0
11
题解 | 小红的二分图构造
#include <iostream> #include <vector> #include <algorithm> using namespace std; void solved() { int n; // 节点数量 cin >>...
2025-04-22
0
13
题解 | 小红的排列构造
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n; // 排列的长度 string s; // 输入的0...
2025-04-22
0
11
题解 | 小红的区间构造
✅ 题目要求简述:给定整数 n, k, x,请你找一个区间 [l, r] 满足:区间长度为 k,即 r = l + k - 1区间中恰好有 n 个 x 的倍数1 ≤ l ≤ r < 2e9如果不存在这样的区间,输出 -1✅ 解题思路:直观理解:一个区间中 x 的倍数是规则出现的。如果我们在区间...
2025-04-21
0
17
题解 | 研究red子序列的红
#include <bits/stdc++.h> using namespace std; using ll = long long; #define int ll const int MAXN = 2e5 + 5; // 定义左子节点和右子节点的宏 #define ls(p) (p...
2025-04-19
0
17
题解 | 喜欢切数组的红
#include <iostream> #include <vector> using namespace std; class EqualSplit { public: // 构造函数,传入数组长度与数组本体 EqualSplit(int n, const...
2025-04-18
0
13
题解 | 喜欢切数组的红
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<long long> a(n); ...
2025-04-18
0
14
题解 | 矩阵乘法计算量估算
#include <iostream> #include <vector> #include <string> #include <stack> using namespace std; // 矩阵结构 struct Matrix { in...
2025-04-15
0
16
首页
上一页
1
2
3
下一页
末页