给我中奖吧
给我中奖吧
全部文章
分类
归档
标签
去牛客网
登录
/
注册
给我中奖吧的博客
全部文章
(共16篇)
题解 | 好多次方
import java.util.Scanner; public class Main { static final int P = 1_000_000_007; static final int PHI_P = 1_000_000_006; // 欧拉函数 (模板) ...
2025-07-18
2
14
题解 |#牛客春招刷题训练营# 小红的对称串
#include <iostream> #include <string> #include <map> using namespace std; int main() { int n; cin >> n; // 构...
2025-06-03
1
35
题解 | #牛客春招刷题训练营#【模板】最小生成树
#include <bits/stdc++.h> using namespace std; int main() { priority_queue<tuple<int, int, int>, vector<tuple<int, int, int&g...
2025-05-29
1
43
题解 | #牛客春招刷题训练营#游游的排列构造
n, k = map(int, input().split()) # 生成好元素的位置(1-based的pos列表) pos = [2 * i + 1 for i in range(k)] # 检查位置是否超过n,这里假设输入是有效的,即2k-1 <=n # 生成好元素的数值,从n-k+1...
2025-05-29
1
49
题解 | #牛客春招训练营#小红浏览论坛
// #牛客春招刷题训练营# https://www.nowcoder.com/discuss/726480854079250432 // 模拟题 #include <iostream> using namespace std; int main() { ios_base::s...
2025-05-29
1
39
题解 |#牛客春招刷题训练营# 【模板】单源最短路Ⅲ ‖ 非负权图
#include <bits/stdc++.h> using namespace std; #define int long long const int INF = 1e18; const int N = 2e6 + 5; int __t = 1, n; vector<pair&...
2025-05-27
1
32
题解 #牛客春招刷题训练我们发现如果a和b都是正数,相同的时候无解,不同的时候只需要给小的数加上大的
#include <bits/stdc++.h> using namespace std; #define int long long const int N = 2e5 + 5; int __t = 1, n, a, b; void solve() { cin >>...
2025-05-27
0
31
题解 |#牛客春招刷题训练营#小红的整数配对
//懒得动那么多脑子了,直接无脑dp写了,状态方程很好写 #include <iostream> #include<bits/stdc++.h> using namespace std; const int N=2e5+5; #define int long long int...
2025-05-27
0
39
题解 |#牛客春招刷题训练营# 游游的最小公倍数
#include <iostream> #include <queue> #include <map> #include <set> #include <cmath> #include <cstring> #include &l...
2025-05-26
0
33
题解 | #牛客春招刷题训练营#【模板】单源最短路Ⅰ ‖ 无权图
#include <iostream> #include <queue> #include <unordered_map> #include <vector> using namespace std; int main() { int n, ...
2025-05-26
0
29
首页
上一页
1
2
下一页
末页