IA3000
IA3000
全部文章
分类
归档
标签
去牛客网
登录
/
注册
IA3000的博客
全部文章
(共21篇)
题解 | 收集金币 | DAG 上 DP
#include <bits/stdc++.h> using namespace std; const int N = 1e3 + 5; int n, m, q; int a[N][N]; void solve() { cin >> n >> m; ...
2026-04-02
0
12
题解 | 冥古之潮 | bfs + dp 排列组合
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5, M = 5e3 + 5, mod =1e9 + 7; int n, m, q, x; vector<int> e[N]; bool vi...
2026-04-01
0
14
题解 | 喝可乐 | 暴力 log 级别复杂度
#include <bits/stdc++.h> using namespace std; void solve() { int n, A, B; cin >> n >> A >> B; int ans = n; fo...
2026-03-29
0
17
题解 | 浮木博弈
#include <iostream> using namespace std; int main() { int T = 1; cin >> T; while (T--) { int n, a, fi = 0; ci...
2026-03-27
0
27
题解 | 太阳之华 | 洪水
#include <bits/stdc++.h> using namespace std; const int N=2e3+5; bitset<N> mat[N]; bool vis[N][N]; int cnt,tot; int n,m; array<int, 2&g...
2026-03-24
1
19
题解 | 小红的01串 | 今年最后一次错误 | 1 != '1'
#include <iostream> using namespace std; int main() { int t; cin>>t; while(t--){ string s,t; cin>>s; ...
2025-12-31
0
69
题解 | 人人都是好朋友 | 被卡常卡死了 | 原来局部 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
69
题解 | 小红的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
61
题解 | 变幻莫测 | 数据范围诈骗
#include <iostream> using namespace std; int main() { int x,y; cin>>x>>y; if(x==y)cout<<0<<"\n"; ...
2025-12-28
0
51
题解 | 小红的树上删边 | 又双叒叕是贪心
注意到随便选定一个点为根,对于非根节点 u 来说,它的连向父亲的边能够删,当且仅当该点为根的子树大小为偶数。因为子树中不管已经删除多少次边了,删除连向父亲的后该点所在的连通块的大小(每次减偶数)的奇偶性始终不变(与原来子树大小相同) #include <bits/stdc++.h> us...
2025-12-27
0
62
首页
上一页
1
2
3
下一页
末页