代码简单,思路清晰 #####代码很简单,不懂看注释######dfs版本最开始想的是dfs,后来发现其实循环就行了#includeusingnamespacestd;stringdfs(strings,intdepth){if(depth==0)returns;s+='&';//设置监督元, 题解列表 2024年01月11日 0 点赞 0 评论 617 浏览 评分:0.0
蓝桥杯2015年第六届真题-奇怪的数列 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<string> #include<algorithm> using namespace std; stri…… 题解列表 2021年12月05日 0 点赞 0 评论 785 浏览 评分:0.0
随便写的方法,只关注结果了 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <algorithm>#include <string>#include <sstream>using name…… 题解列表 2021年11月04日 0 点赞 0 评论 749 浏览 评分:0.0
蓝桥杯2015年第六届真题-奇怪的数列-题解(C++代码) 摘要:#include <iostream>#include <cstring>using namespace std;char a[110000];char s[1000010];int main(){ …… 题解列表 2021年01月30日 0 点赞 0 评论 591 浏览 评分:0.0
蓝桥杯2015年第六届真题-奇怪的数列-题解(C++代码)代码不多,简单操作 摘要:```cpp #include #include #include using namespace std; void fun(string &str) { string s=""; …… 题解列表 2020年10月13日 0 点赞 0 评论 981 浏览 评分:6.0
蓝桥杯2015年第六届真题-奇怪的数列-题解(C++代码) ###解题思路:模拟,枚举每一个得到的字符串,遍历这个字符串,统计连续相同的字符添加进空串中。```cpp#include#definexfirst#defineysecond#definemem(h)memset(h,-1,sizeofh)#definemcp(a, 题解列表 2020年10月09日 0 点赞 0 评论 984 浏览 评分:0.0
我不是张玉想——奇怪的数列-题解(C++代码) 摘要:## 一、解题思路: 字符串处理:一开始用的别的方法,写到最后搞混了,后来就试了下这种,效果还行,关键点是【字符串和字符可以用‘+’直接连接起来】 ## 二、完整代码 ```cpp #in…… 题解列表 2020年08月21日 0 点赞 0 评论 1754 浏览 评分:9.9
蓝桥杯2015年第六届真题-奇怪的数列-题解(C++代码) 摘要:参考代码:#include<bits/stdc++.h> using namespace std; int main() { char s[101],k[101],*q,b; //s当前串 …… 题解列表 2020年08月07日 0 点赞 0 评论 1244 浏览 评分:9.9
蓝桥杯2015年第六届真题-奇怪的数列-题解(C++代码) 摘要:``` #include using namespace std; int main() { int n; string s,t; cin>>s>>n; while(n-…… 题解列表 2020年07月02日 0 点赞 0 评论 841 浏览 评分:0.0
蓝桥杯2015年第六届真题-奇怪的数列 (C++代码)---int和char转换的简单应用 注意事项:1.统计某个数字出现次数,记得将int型次数转换为字符型,接在新的字符串之后2.一开始输入的字符串不算一次。总共要变换n次```cpp#include#include#includeusingnamespacestd;stringa, 题解列表 2020年03月28日 0 点赞 0 评论 1134 浏览 评分:9.9