牛客892810292号
牛客892810292号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客892810292号的博客
全部文章
(共21篇)
题解 | #大整数的因子#
#include <iostream> #include<bits/stdc++.h> using namespace std; // 做精度运算时, 先设计一个容纳元素的数据结构, 包括数组, 数组长度。 除法 。 要从数的开头 一个一个地除 , 之后取模计算。 str...
2024-08-18
0
129
题解 | #质因数的个数#
#include <iostream> #include<bits/stdc++.h> using namespace std; // 短除法 用于将数质数分解 // 质数筛法。 // int t = sqrt(1e9) +1 ; const int N = 1e4 ...
2024-08-17
0
151
题解 | #最简真分数#
#include <iostream> #include<bits/stdc++.h> using namespace std; int GCD(int a , int b) { if(b == 0) { return a ; } ...
2024-08-13
0
182
题解 | #简单计算器#
时间复杂度 O(n) ; 空间复杂度O(n) ; 记得要在字符串末尾添加‘$’ 作为 最低优先级的运算符, 以便与将栈内的运算符全部弹出去运算。 因为规则是只有在当前运算符的优先级 小于等于 栈顶的运算符的时候才会进行弹栈计算。 #include<bits/stdc++.h> using...
2024-08-13
0
127
题解 | #浮点数加法#
#include <bits/types/struct_tm.h> #include <cassert> #include <iostream> using namespace std; // 想法是在短的字符串前面补0 , 后面补0 补成一样长度的字符串。 ...
2024-08-11
0
122
题解 | #单词替换#
#include <iostream> #include<bits/stdc++.h> #include <sstream> using namespace std; int main() { vector<string > st ; ...
2024-08-09
0
128
题解 | #简单密码#
#include <iostream> using namespace std; int main() { string encrp, res ; while (getline(cin, encrp)) { if(encrp == "START...
2024-08-09
0
122
题解 | #找位置#
#include <climits> #include <iostream> #include<map> #include<bits/stdc++.h> #include<string> using namespace std; struc...
2024-08-09
0
119
题解 | #密码翻译#
#include <iostream> using namespace std; int main() { string encrp , res ; while(getline(cin , encrp)) { for(int i =0 ; i ...
2024-08-09
0
155
题解 | #手机键盘#
#include <iostream> #include <tuple> using namespace std; // keytable 当要二十六个字母映射为按键次数时,直接使用数组。 int keytable[26] = {1,2,3,1,2,3,1,2,3,1,2...
2024-08-08
0
163
首页
上一页
1
2
3
下一页
末页