IA3000
IA3000
全部文章
分类
归档
标签
去牛客网
登录
/
注册
IA3000的博客
全部文章
(共25篇)
题解 | 人人都是好朋友 | 被卡常卡死了 | 原来局部 vector
这么差
#include <bits/stdc++.h> using namespace std; const int N=1e6+5; struct DSU{ vector<int> f,rk; void init(int n){ rk.assi...
2025-12-30
0
90
题解 | 小红的01子序列构造(easy)| new int 竟然不是初始化为 0 !!!
[牛泪] #include <bits/stdc++.h> using namespace std; int main() { string s; long long n,k; cin>>n>>k; cin>>s; ...
2025-12-29
0
79
题解 | 变幻莫测 | 数据范围诈骗
#include <iostream> using namespace std; int main() { int x,y; cin>>x>>y; if(x==y)cout<<0<<"\n"; ...
2025-12-28
0
68
题解 | 小红的树上删边 | 又双叒叕是贪心
注意到随便选定一个点为根,对于非根节点 u 来说,它的连向父亲的边能够删,当且仅当该点为根的子树大小为偶数。因为子树中不管已经删除多少次边了,删除连向父亲的后该点所在的连通块的大小(每次减偶数)的奇偶性始终不变(与原来子树大小相同) #include <bits/stdc++.h> us...
2025-12-27
0
77
题解 | 小红的圆移动 | 【贪心】| 第一发理解反了
#include <bits/stdc++.h> using namespace std; const int N=1e5+5; const double pi = acos(-1); struct Node{ double x,y,r,v; bool operat...
2025-12-26
0
79
题解 | 魔法棒 | a*b - a - b
#include <bits/stdc++.h> using namespace std; int main() { vector<bool> f(14); f[0]=true; for(int i=0;i<14;i++){ ...
2025-12-25
0
70
题解 | 小猫排队 | 一眼:单调栈?二眼:被骗了!
#include <iostream> using namespace std; const int N= 2e5+5; int stk[N],t,a[N]; int nxt[N]; int main() { int n; cin>>n; n++...
2025-12-22
1
80
题解 | 排座椅 | 模拟题要耐心写
#include <bits/stdc++.h> using namespace std; int main() { int n,m,k,l,d; cin>>n>>m>>k>>l>>d; vector&...
2025-12-21
0
65
题解 | 小红的口罩 | 优先队列贪心
#include <iostream> #include <queue> using namespace std; int main() { int n,k,a,ans=0; priority_queue<int> pq; cin>...
2025-12-19
0
69
题解 | 01串题
#include <iostream> using namespace std; int main() { int a,b,x; cin>>a>>b>>x; x/=2; a-=x; b-=x; if(a...
2025-12-18
1
66
首页
上一页
1
2
3
下一页
末页