AlL_VieW
AlL_VieW
全部文章
分类
归档
标签
去牛客网
登录
/
注册
AlL_VieW的博客
全部文章
(共3篇)
题解 | 隐匿社交网络
建图,定义62个虚点,分别表示第i位上是否是1,然后遍历所有数,将其连向对应的虚点。最后进行dfs即可。需要注意的一个细节是虚点不能被计入答案,需要减去这部分。 #include<bits/stdc++.h> #define int long long using namespace s...
2025-04-10
0
32
题解 | 1or0
#include<bits/stdc++.h> #define int long long using namespace std; int const N = 2e5+9; int const inf = 1e9+7; string s; int n,q; pair<int,in...
2025-04-10
0
26
题解 | 小红的好排列
#include<bits/stdc++.h> #define int long long using namespace std; int const N = 1e6+9; int const mod = 1e9+7; int n; int f[N],nf[N]; int ksm(i...
2025-04-08
0
63