ddhw111
ddhw111
全部文章
分类
题解(16)
归档
标签
去牛客网
登录
/
注册
ddhw111的博客
sajin_fan
全部文章
(共26篇)
题解 | 多米诺骨牌
#include<bits/stdc++.h> #define endl "\n" #define int long long using namespace std; void slove() { int n, m; std::cin >>...
2026-03-04
0
16
题解 | 相邻的糖果
#include<bits/stdc++.h> #define endl "\n" #define int long long using namespace std; void slove() { int n, m, x; std::cin >...
2026-02-07
0
28
题解 | 子数列求积
#include<bits/stdc++.h> #define endl "\n" #define int long long using namespace std; struct node { int l, r, sum; } tree[4 * 10001...
2026-01-13
0
30
题解 | 区间取反与区间数一
#include<bits/stdc++.h> #define endl "\n" #define int long long using namespace std; struct node { int l, r, cnt, laz; } tree[5000...
2026-01-08
0
33
题解 | 明日DISCO
#include<bits/stdc++.h> #define endl "\n" #define int long long using namespace std; int d[4][2] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};...
2026-01-07
0
50
题解 | 先序遍历、中序遍历和后序遍历
#include<bits/stdc++.h> #define endl "\n" #define int long long using namespace std; void slove() { int n; std::cin >> n...
2026-01-01
0
39
题解 | 小红的01串
#include<bits/stdc++.h> #define endl "\n" #define int long long using namespace std; void slove() { std::string s; std::cin &g...
2025-12-31
0
42
题解 | 人人都是好朋友
#include<bits/stdc++.h> #define endl "\n" #define int long long using namespace std; struct node { int u, v, w; bool operator ...
2025-12-30
0
47
题解 | 秘藏
#include<bits/stdc++.h> #define endl "\n" #define int long long using namespace std; int dp[200010][2][2];// 1 biao 1 li void slove() ...
2025-12-24
0
33
题解 | 降温(easy)
贪心。要凑到最大的数量,让可以更改的位置的数值更改成为上一个离自己最近位置并且有数值的数-x。注意如果减到小于值域下限,我们可以直接更改为值域上限。这样做的目的是方便让后面的可更改位置产生贡献。凑最小的答案,就一直让可更改位置的数值更改为上一个值-x+1即可。 #include<bits/st...
2025-12-07
0
36
首页
上一页
1
2
3
下一页
末页