满船清梦压星河1
满船清梦压星河1
全部文章
分类
归档
标签
去牛客网
登录
/
注册
满船清梦压星河1的博客
全部文章
(共22篇)
题解 | 字符串分隔
#include <iostream> #include<vector> #include<cmath> using namespace std; int main() { string s; cin>>s; //计算所需行数...
2025-02-14
0
83
题解 | 合并表记录
#include <iostream> #include <map> using namespace std; int main() { int n; cin >> n; // 读取记录数 // 使用 map 来存储索引和对应的数值 ...
2025-02-14
0
109
题解 | 字符逆序
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string s; getline(cin, s); ...
2025-02-13
0
89
题解 | 排序
#include <algorithm> #include <iostream> #include <vector> using namespace std; //vector更适合存储和操作大量数据,且支持随机访问,排序和反转操作更高效。list 的插入和删除操...
2025-02-13
0
102
题解 | 整数与IP地址间的转换
#include <iostream> #include <string> using namespace std; unsigned int IPtoDD(string& s) { unsigned int ans = 0;//防止数值溢出 siz...
2025-02-13
0
93
题解 | 删除字符串中出现次数最少的字符
#include<iostream> #include<string> #include<vector> #include <climits> //提供了与整数类型相关的宏常量,用于表示各种整数类型的最小值和最大值,部分版本不需要该头文件。 //#in...
2025-02-13
0
71
题解 | 密码验证合格程序
#include <iostream> #include <string> #include <cctype> // 用于 isalnum 函数 using namespace std; // 大写字母检测函数 int Captal_detection(cons...
2025-02-13
0
80
题解 | 坐标移动
#include <iostream> #include <string> #include <cctype> // 用于 isdigit 函数 using namespace std; // 判断一个字符串是否是合法的指令 bool isValidComman...
2025-02-13
0
72
题解 | 跳台阶
class Solution { public: int jumpFloor(int number) { if (number <= 0) return 0; // 边界条件 if (number == 1) return 1; // 1 级台阶只有 1...
2025-02-13
0
93
题解 | 字符个数统计
#include <iostream> #include <set> using namespace std; int AsciiChars(const string& s) { // 使用 set 来存储不同的字符 set<char> ...
2025-02-13
0
98
首页
上一页
1
2
3
下一页
末页