讲义气的勇士愿offer多多
讲义气的勇士愿offer多多
全部文章
分类
归档
标签
去牛客网
登录
/
注册
讲义气的勇士愿offer多多的博客
TA的专栏
4篇文章
0人订阅
字符串操作
4篇文章
92人学习
全部文章
(共110篇)
题解 | #判断两个IP是否属于同一子网#
// 真是又臭又长的代码 20240927 #include <iostream> #include <vector> using namespace std; bool isValidIp(string ip){ bool bisValid = true; ...
2024-09-27
0
87
题解 | #统计每个月兔子的总数#
#include <iostream> using namespace std; int f(int n){ if(n == 1 || n == 2){ return 1; } int m1 = 1; int m2 = 1; i...
2024-09-27
0
63
题解 | #字符串加密#
#include <deque> #include <iostream> #include <set> #include <string> using namespace std; /* 程序思路:目标是构建两个一一对应的字符串 一个是 26...
2024-09-27
0
79
题解 | #计算某字符出现次数#
#include<iostream> #include <map> using namespace std; int main(){ string str; char c; getline(cin, str); cin >> c...
2024-09-26
0
70
题解 | #蛇形矩阵#
// 抄评论区里面的代码写的。 #include<iostream> #include <vector> using namespace std; int main(){ int n; cin >> n; int num = 1; ...
2024-09-26
0
72
题解 | #图片整理#
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { string input; cin >> inp...
2024-09-26
0
63
题解 | #整数与IP地址间的转换#
/* 涉及到的知识点 1. 字符串处理 2. vector 数组的应用 3. 位运算 左移 右移 与运算 或运算 */ #include <iostream> #include <string> #include <vector> using namesp...
2024-09-26
0
62
题解 | #单词倒排#
#include <algorithm> #include <iostream> using namespace std; string reverseStr(string str){ int len = str.length(); string ans; ...
2024-09-26
0
71
题解 | #字符串合并处理#
#include <algorithm> #include <iostream> #include <vector> using namespace std; // 把奇数位字符与偶数位字符分别读入两个vector中, // 再分别对两个vector进行排序 /...
2024-09-26
0
55
题解 | #字符串加解密#
#include <iostream> using namespace std; void encrypt(string& str) { int len = str.length(); for (int i = 0; i < len; i++) { ...
2024-09-26
0
51
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页