quchen666
quchen666
全部文章
分类
题解(1)
归档
标签
去牛客网
登录
/
注册
quchen
😋
全部文章
(共15篇)
题解 | 小红的 gcd
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string a; ll b; cin>>a>>b; ll res ...
2025-12-02
0
4
题解 | 构造数独
#include <bits/stdc++.h> using namespace std; int n,k; int main() { cin>>n>>k; for(int i=1;i<=n;i++) { fo...
2025-12-01
0
7
题解 | 小红的区间修改(一)
#include <bits/stdc++.h> #include <iostream> using namespace std; typedef long long ll; const int N = 3e5+10; int a[N]; int tree[N]; int l...
2025-11-30
2
10
题解 | 小天的 Minecraft
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll fac[17]; ll C(int n,int m) { return fac[n]/fac[n-m]/fac[m]; } voi...
2025-11-29
0
11
题解 | 小sun的假期
#include <bits/stdc++.h> using namespace std; const int N=1e5+10; typedef long long ll; struct Node { int l,r; }a[N]; bool cmp(Node a,...
2025-11-27
0
9
题解 | 能量辐射
#include <bits/stdc++.h> using namespace std; const int N = 2e5+10; typedef long long ll; ll h[N],w[N]; ll ans[N]; int main() { int n; c...
2025-11-24
1
8
题解 | 最小连通代价
#include <bits/stdc++.h> using namespace std; typedef long long ll; void solve() { ll n,a,b; cin>>n>>a>>b; ll cnt0...
2025-11-23
0
11
题解 | #小A弹吉他#
思路 这题我们不难发现,要使得最终的mex尽可能的大,需要我们使用一个贪心策略,假设最终的mex为x+1,那么我们需要构造一个式子, ,要使得式子的求和尽量的少,我们只需要令 即可,那么最终的求和就是 个平方推导之后的结果就是 ,然后接下来就是二分答案的事情。 题解 #include <...
2025-11-22
3
17
题解 | 旅游
#include <bits/stdc++.h> typedef long long ll; const int N = 2e5+10; using namespace std; struct Node { int u,v; ll w; }e[N]; bool cmp(...
2025-11-19
2
14
题解 | 奶牛排排站
#include <bits/stdc++.h> using namespace std; const int N=21; typedef long long ll; ll fac[N]; int a[N]; int b[N]; bool used[N]; int main() { ...
2025-11-18
2
14
首页
上一页
1
2
下一页
末页