不学习就会变废物
不学习就会变废物
全部文章
分类
归档
标签
去牛客网
登录
/
注册
不学习就会变废物的博客
TA的专栏
35篇文章
0人订阅
2025考研复试
35篇文章
69人学习
全部文章
(共34篇)
题解 | 编排字符串 栈(备份栈)
来自专栏
#include <stdio.h> #include <stack> #include <string> using namespace std; int main() { stack<string> myStack; // stack&l...
2025-03-18
0
55
题解 | 浮点数加法 方法二
来自专栏
// 求整数部分不补零的方法(vector<char>/string前置补零时间复杂度高) #include <iostream> #include <string> using namespace std; // 获取整数部分 string getIntege...
2025-03-18
0
41
题解 | 浮点数加法 补'0',各各位相加 ASCII相加 '0'='0' '1'='0'+1
来自专栏
#include <iostream> #include <string> using namespace std; // 获取整数部分 string getInteger(string a) { // 从0开始 截取a.find(".")长度 ...
2025-03-17
0
67
题解 | 找位置 方法二: multimap,但还是要vector
记录先后顺序
来自专栏
#include <iostream> // map不允许 关键字重复 的键值对,只会读入第一对,其它无影响 #include <map> #include <vector> #include <algorithm> using namespace s...
2025-03-16
0
51
题解 | 找位置 两个map,一个记录字符位置,一个记录出现先后顺序
来自专栏
#include <iostream> #include <map> #include <vector> #include <algorithm> using namespace std; int main() { char str[200]...
2025-03-16
0
42
题解 | 找x 动态数组,注意找到后的处理,否则会多输出-1
来自专栏
#include <iostream> #include <vector> // 数据长度未知,用动态数组 using namespace std; int main() { int n, target; // 迭代器需要另配 记录下标的数据 wh...
2025-03-15
0
47
题解 | 找x map+stl工具
来自专栏
#include <iostream> #include <map> using namespace std; int main() { int n, target; map<int, int> dataSource; pair<i...
2025-03-15
0
38
题解 | 剩下的树 标志动态数组/容器
来自专栏
#include <iostream> #include <vector> using namespace std; int main() { int L, M, start, end, count; // 用标志数组表示有树无树 vector<int> ...
2025-03-12
0
50
题解 | 完数VS盈数 格式大坑爹(自测和提交格式不同)
来自专栏
#include <iostream> #include <vector> using namespace std; int main() { int factorSum; // 因子总和 vector<int> factor; // 因子 ...
2025-03-12
0
41
题解 | 日期累加
来自专栏
#include <iostream> using namespace std; void nextDay(int& year, int& month, int& day) { // 每个月份的天数数组 int dayOfMonth[] = { 0,31,2...
2025-03-11
0
41
首页
上一页
1
2
3
4
下一页
末页