虚心的存钱罐
虚心的存钱罐
全部文章
分类
题解(58)
归档
标签
去牛客网
登录
/
注册
虚心的存钱罐的博客
全部文章
(共58篇)
题解 | #矩阵乘法计算量估算#C++解法
#include<iostream> #include<vector> using namespace std; int fun(int x,int y,int z) { int a[x][y];//矩阵a int b[y][z];//矩阵b int ...
2021-08-19
0
470
题解 | #矩阵乘法计算量估算#C++解法,调试了好久。终于把思路理清楚了
//解题思路,逐个字符解析计算法则的字符串 //1.遇到'('直接跳过,看下一个元素 //2.遇到字母,入栈。若下一个字符也是字母,出栈一个元素与下一个矩阵直接计算出结果, // 然后将计算后的矩阵入栈,直到下一个不是字母。 //3.遇到字母,入栈。若下一个字符不是字母,直接看下一个字符 //4....
2021-08-18
0
410
题解 | #名字的漂亮度#C++,主要就是统计各个字母出现的个数
#include <bits/stdc++.h> using namespace std; int main() { int N; cin>>N; string str; while(cin>>str) { ...
2021-08-01
0
496
题解 | #字符串通配符# C++数学解法
#include<bits/stdc++.h> using namespace std; int main() { double db; while(cin>>db) { int flag=0;//负数处理成正数,后面再处理回来 ...
2021-08-01
0
582
题解 | #字符串通配符# C++解法,这道题做了很久,而且标准答案还有点问题,需要特殊处理才能通过
//整体思路 //第一个*前和最后一个*后的字符串除?外必须和待匹配字符串的开头结尾一致 //两个*之间的字符串除?必须在待匹配字符串中先后存在 #include<bits/stdc++.h> using namespace std; int fun(string str1,string...
2021-07-31
0
586
题解 | #查找两个字符串a,b中的最长公共子串# C++解法,相对还是简单
#include<bits/stdc++.h> #include<string> using namespace std; int main() { string x,y; while(cin>>x>>y) { //以下开始,先...
2021-07-27
0
564
题解 | #统计字符# C++解法,很简单吧
如果是数字,则加个*就行了,没啥难度 #include<bits/stdc++.h> using namespace std; int main() { string str; while(cin>>str) { int flag=0;...
2021-07-27
0
470
题解 | #统计字符#C++,这道题简单到怀疑
#include<bits/stdc++.h> using namespace std; int main() { string str; while(getline(cin,str)) { int a=0,b=0,c=0,d=0; ...
2021-07-22
0
475
题解 | #字符串加密# C++解法 3ms通过
#include<iostream> #include<string> #include<algorithm> #include<vector> using namespace std; int main() { string key,ming...
2021-07-22
0
500
题解 | #截取字符串# C++解法
#include<iostream> #include<string> using namespace std; int main() { string str; int n; while(cin>>str>>n) { ...
2021-07-21
0
410
首页
上一页
1
2
3
4
5
6
下一页
末页