凉州词
凉州词
全部文章
分类
归档
标签
去牛客网
登录
/
注册
凉州词的博客
TA的专栏
24篇文章
0人订阅
进制转换问题
7篇文章
24人学习
最大公约数 最小公倍数
2篇文章
26人学习
质数(素数)相关问题
5篇文章
28人学习
矩阵与矩阵快速幂
3篇文章
26人学习
大整形(高精度整数)
2篇文章
29人学习
贪心策略 简单贪心 区间贪心
3篇文章
56人学习
动态规划 空间换时间
2篇文章
23人学习
全部文章
(共30篇)
题解 | 质因数的个数
来自专栏
#define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <iostream> #include <vector> using namespace std; const int maxn = 4e4;...
2025-03-01
0
25
题解 The k-th prime number
来自专栏
//完全照搬筛法代码,输出prime[k-1]即可 #include <cstdio> #include <iostream> #include <vector> using namespace std; const int maxn = 1e5 + 10; bo...
2025-03-01
0
27
题解 | 筛出一定范围内所有素数
来自专栏
//主要难点:利用筛法找素数(initial) #include <cstdio> #include <iostream> #include <vector> using namespace std; const int maxn = 1e5 + 10; bool...
2025-03-01
0
28
题解 | 素数判定
来自专栏
//用n对2到sqrt(n)取余,期间若有余数为0,return false; 否则 return true #include <stdio.h> #include <iostream> #include <cmath> using namespace std; ...
2025-03-01
0
20
题解 | 最简真分数
来自专栏
//只要有不为1的公约数,则不是最简真分数,逆否命题,如果是最简真分数,公约数为1 #include <iostream> using namespace std; int arr[601]; int gcd(int a, int b) { if (b == 0) { ...
2025-03-01
0
24
题解 | 最大公约数
来自专栏
//两种写法 原理都是欧几里得算法(辗转相除法) //递归写法 #define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <iostream> using namespace std; int gcd(int ...
2025-03-01
1
26
题解 | 数制转换 与m转n完全相同
来自专栏
#define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <vector> #include <string> #include <iostream> using namespace st...
2025-03-01
0
20
题解 | 进制转换 16转10
来自专栏
//只需调用前面写的 m转十 代码就行,将m=16 #define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <vector> #include <string> #include <iostre...
2025-03-01
0
22
题解 | 又一版 A+B 考查的依旧是1到10进制转化
来自专栏
//注1:unsigned int 用%u占位符接收 //注2:两个unsigned int 相加结果可能溢出,用long long 保存结果 #include <cstdio> #include <vector> #include <iostream> usi...
2025-03-01
0
20
题解 | 八进制
来自专栏
//简单题 当该数不为0时 只需对进制不断取余 并除进制, 就可以得到该进制数 #include <cstdio> #include <vector> using namespace std; void convert(int number,int n) { vecto...
2025-03-01
0
22
首页
上一页
1
2
3
下一页
末页