SDU_25_数学交叉_新耕孙
SDU_25_数学交叉_新耕孙
全部文章
分类
归档
标签
去牛客网
登录
/
注册
SDU_25_数学交叉_新耕孙的博客
全部文章
(共9篇)
题解 | 排座椅
#include<bits/stdc++.h> using namespace std; vector<int>x1; vector<int>x2; vector<int>yy1; vector<int>yy2; vector<pa...
2025-12-21
0
11
题解 | 76选数
#include <iostream> using namespace std; int main() { long long n; cin>>n; unsigned long long mask = 1; while(mask<n){...
2025-12-19
0
11
题解 | 小红的口罩
#include<bits/stdc++.h> using namespace std; int main(){ int n; long long k; cin>>n>>k; long long sum=0;//不适度总和 ...
2025-12-19
0
9
题解 | 【模板】差分
#include<bits/stdc++.h> using namespace std; const int MAXN = 5000005; long long a[MAXN]; long long diff[MAXN]; //构建差分数组 void build_diff(int n)...
2025-12-19
0
10
题解 | 宵暗的妖怪
#include<bits/stdc++.h> using namespace std; typedef long long ll; //状态转移方程为dp[i]=max(dp[i-1],dp[i-3]+a[i-1]); //其中dp[i]表示前i项中最大值 int main(){ ...
2025-12-18
0
10
题解 | 矩阵的最小路径和
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; vector<vector<int>> dp(n+1,vect...
2025-12-18
0
11
题解 | 小红走矩阵
#include<bits/stdc++.h> using namespace std; //根据排列组合的小知识,从起点到终点一共要走n-1步向下,m-1步向右 //因此总步数为(m+n-2)!/(m-1!*n-1!),其中(m+n-2)!为所有元素全排列,除去相同元素内部排列即可 /...
2025-12-18
0
15
题解 | 有序序列合并
#include <cmath> #include <iostream> #include <vector> using namespace std; int main(){ int n,m; cin>>n>>m; ...
2025-12-18
0
8
题解 | 水仙花数
#include <iostream> using namespace std; int main(){ int m,n; while(cin>>m>>n){ int res=0; for(int i=m;i<...
2025-12-18
0
16