一只菜弱鸡
一只菜弱鸡
全部文章
题解
未归档(3)
归档
标签
去牛客网
登录
/
注册
一只菜弱鸡的博客
全部文章
/ 题解
(共62篇)
题解 | #密码验证合格程序#
看了好久第三条看不懂ORZ 看大家讨论的好像是不能有长度大于2的子串重复... 1、正则表达 #include <bits/stdc++.h> using namespace std; string regstr[4]...
C++
2022-04-22
0
300
题解 | #合并表记录#
#include <iostream> #include <map> //map会自动按照key升序排列元素 using namespace std; int main() { int n; cin >> n; map<int,int...
C++
2022-04-22
0
272
题解 | #最长回文子串#
// 菜人看懂马拉车真的用了好久 #include <bits/stdc++.h> using namespace std; string Manacher(string tmp) { ...
C++
2022-04-21
0
272
题解 | #找出字符串中第一个只出现一次的字符#
/*毫无技术可言,遍历每个字符出现的次数,为1便输出该字符,停止*/ #include <bits/stdc++.h> using namespace std; int main () { ...
C++
2022-04-20
5
256
题解 | #表示数字#
7的倍数,不是倍数的转化成字符串判断是否含有' 7 '。 #include <bits/stdc++.h> using namespace std; int main () { int&nb...
C++
2022-04-20
0
257
题解 | #表示数字#
/*1、考虑输入字符串中没有数字 可能有*的情况*/ #include <bits/stdc++.h> using namespace std; int main() { string str, ans; ...
C++
2022-04-20
0
292
题解 | #成绩排序#
stable_sort()排序不改变相同值元素的顺序。 #include <bits/stdc++.h> using namespace std; bool cmp0(pair<string,int> a, pair<string, int> b) { //0为...
C++
2022-04-20
6
429
题解 | #矩阵乘法计算量估算#
int型的栈,偷个懒,把括号也往里面放。 从头开始,左括号入栈;字母,也就是它代表的矩阵,行、列数入栈;右括号不入栈,并且前两个字母对应的行列数和一个左括号出栈,这两个字母矩阵相乘(记录乘法量)得到新的矩阵,行、列数入栈(这个新的行数是出栈的两个矩阵里前者的行数,新的列数是后者的列数,重温一下...
C++
2022-04-20
0
261
题解 | #高精度整数加法#
#include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; vector<int> Sum(strin...
C++
2022-04-19
0
298
题解 | #查找两个字符串a,b中的最长公共子串#
用短串(str1)做外层循环,由于题目是找最长的公共子串,所以在长串里find短串所有的子串(按从长到短,最长是自身,最短是每个字符),第一个在长串里find成功的就是二者最长的公共子串了。.......懒得想怎么跳出循环了直接全部存入vector,输出第一个。 #include &l...
C++
2022-04-19
0
326
首页
上一页
1
2
3
4
5
6
7
下一页
末页