上一页 1 2 3 4 5 6 7 8 9 10 ··· 16 下一页
摘要: 题目: 思路: 1.题目含义 1 一个一 11 表示上面的1个1 现在代表两个1 12 1121 表示1有2个,2有1个,1有1个 122111 表示1有1个,2有两个,1有3个 112213 以此类推 代码如下: #include <iostream> #include<cstring> usin 阅读全文
posted @ 2020-08-05 23:05 miao-xixixi 阅读(133) 评论(0) 推荐(0)
摘要: 1.头文件 #include<cstring> 2.功能 #include <iostream> #include<cstring> using namespace std; int main () { int m=100; string str=to_string(m); cout<<str[0] 阅读全文
posted @ 2020-08-05 18:16 miao-xixixi 阅读(213) 评论(0) 推荐(0)
摘要: 1.头文件#include<cstring> 2.功能 #include <iostream> #include<cstring> using namespace std; int main () { string s="aaa"; cout<<s.find_first_not_of(s[0],1) 阅读全文
posted @ 2020-08-05 17:40 miao-xixixi 阅读(276) 评论(0) 推荐(0)
摘要: 1.头文件 #include<cctype> 2.函数原型 int toupper(int c); 3.用法 #include<cstdio> #include<cctype> #include<iostream> using namespace std; int main(){ char a; c 阅读全文
posted @ 2020-07-23 23:21 miao-xixixi 阅读(448) 评论(0) 推荐(0)
摘要: 代码如下: 将小写转换为大写 #include<cstdio> #include<iostream>#include<algorithm>using namespace std;int main(){ char a; cin>>a; char b; b=a-32; cout<<b<<endl; re 阅读全文
posted @ 2020-07-23 23:15 miao-xixixi 阅读(354) 评论(0) 推荐(0)
摘要: 题目如下: 思路: 1. 123 132 213 231 从231开始往上还有三个顺序加上本身为4个 2.需要注意的是定义为char 因为没有输入空格 代码如下: //321 312 231 213 //123 132 213 231 #include<cstdio> #include<iostre 阅读全文
posted @ 2020-07-23 22:59 miao-xixixi 阅读(147) 评论(0) 推荐(0)
摘要: 题目如下: 思路: 1.求上一个字典符顺序,利用prev_permutation() 代码如下: #include<cstdio> #include<algorithm> #include<iostream> using namespace std; int main(){ int n; cin>> 阅读全文
posted @ 2020-07-18 11:44 miao-xixixi 阅读(125) 评论(0) 推荐(0)
摘要: 1求上一个字典符顺序,顺序是从大到小 2.头文件#include<algorithm> 阅读全文
posted @ 2020-07-18 11:32 miao-xixixi 阅读(138) 评论(0) 推荐(0)
摘要: 题目如下: 思路: <1> 1->11 11->110 最终 110+11=121 <2>cout一个数的话会默认为int 代码如下: #include<cstdio> #include<iostream> #include<cmath> using namespace std; int main( 阅读全文
posted @ 2020-07-17 23:22 miao-xixixi 阅读(174) 评论(0) 推荐(0)
摘要: 题目如下: 思路: 1.不要被数量这个迷惑不要管就行了 2.不要被前导零吓着了,题目意思是可有可无,即不用管 3.主要是数据类新比较大 代码如下: #include<cstdio> #include<cstring> #include<iostream> using namespace std; i 阅读全文
posted @ 2020-07-16 10:36 miao-xixixi 阅读(186) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 16 下一页