AND20211201
AND20211201
全部文章
题解
dfs(1)
总结(28)
数据结构(1)
未归档(1)
洛谷(1)
归档
标签
去牛客网
登录
/
注册
AND20211201的博客
全部文章
/ 题解
(共113篇)
倍数问题
来自专栏
">#include <vector> #include<algorithm> #include<cstring> using namespace std; const int N = 1e3 + 10; vector<int> a[N]; int f...
2022-03-22
1
293
修改数组
">using namespace std; const int N = 1e6 + 1e5 + 10; int p[N]; int find(int x) // 并查集 { if (p[x] != x) p[x] = find(p[x]); return p[x]; } int ...
并查集
2022-03-21
1
268
字母组合
题目描述: 由 A,B,C 这3个字母就可以组成许多串。 比如:“A”,“AB”,“ABC”,“ABA”,“AACBB” … 现在,小明正在思考一个问题: 如果有a个A,b个B,c个C 字母,能组成多少个不同的长度为n的串呢? ">using namespace std; const int N =...
2022-03-18
1
425
X的因子链
要想求出严格递增且任意前面数可以整除后面数的因子序列,就要用到算术基本定理,先随便找一个质因子,然后序列的第二个数一定是前面的质因子再乘上另一个质因子,以此类推,序列最后一个数一定是所有质因子的乘积。所以,序列的长度是质因子的个数。排列的方式不一定是质因子个数的阶乘,因为在选择过程中,会有重复,比如...
2022-03-17
1
359
等差数列
#include<iostream> #include<algorithm> using namespace std; const int N = 1e5 + 10; int a[N];...
2022-03-16
1
193
大臣的旅费
#include<iostream> #include <vector> using namespace std; const int N = 1e5 + 10; typedef&nbs...
2022-03-15
1
269
全球变暖
#include<iostream> #include <queue> #define x first #define y second using namespace std; typedef ...
C++
广度优先搜索
2022-03-15
1
321
地牢大师
#include<iostream> #include<queue> #include<cstring> #include<cstdio> using namespace std; char s[110][110][110...
2022-03-14
0
290
完全二叉树的权值
#include<iostream> using namespace std; typedef long long LL; const int N = 1e5 + 10; LL&...
2022-03-14
0
342
红与黑(DFS)
DFS ">#include<cstring> using namespace std; typedef pair<int, int> PII; char s[30][30]; bool t[30][30]; int n, m; int dx[4] = {1, -1, 0, ...
2022-03-13
1
299
首页
上一页
3
4
5
6
7
8
9
10
11
12
下一页
末页