题解列表

筛选

使用getline求解

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std;vector<string>kk;int main(){ int N; strin……

使用stringstream求解

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std;vector<string>kk;int main(){ int N; strin……

使用reverse求解

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std;int main(){ string str; cin>>str; cout<<s……

if~else if处理和正则表达式处理

摘要:解题思路:首先可以想到将字符串转化为字符数组,再用if~else if判断统计。再次思考可以想到能用正则表达式来匹配字符串中的字符类型。注意事项:字符串类型输入需要使用nextLine(),因为输入字……

判断最后一个字符

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std;int main(){ string s1,s2; cin>>s1>>s2; in……

求1+2!+3!+...+N!的和

摘要:解题思路:先求每个数的阶乘再相加注意事项:注意用long类型参考代码:public static void main(String[] args) { Scanner sc = new Scanner……

简单字符串的不简单解法

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std;int main(){ int N; string s; cin>>N; getl……

蓝桥杯算法提高VIP-邮票面值设计(java代码)

摘要:解题思路:        深度优先遍历就可以,可以把一个设计完的邮票面值组合看作在长度减一的邮票组合的基础上再加上一个邮票面值。最后再依次对设计完的邮票面值组合进行计算其所能连续达到的最大邮资就可以。……