C/C++ Vector动态数组 荣耀 (C/C++代码) 摘要:解题思路:定义一个vector向量容器来存储数据,相当于C语言中的动态数组。vector<int> vec;然后把数据存入vec容器中vec.push_back(data);然后复用switch开关语…… 题解列表 2019年01月03日 4 点赞 0 评论 1004 浏览 评分:0.0
去除空格 (C++代码)水一下 摘要:参考代码:#include<bits/stdc++.h> using namespace std; int main(){ char kk[3000]={0}; gets(kk); f…… 题解列表 2018年12月30日 0 点赞 0 评论 1592 浏览 评分:0.0
优质题解 元素配对 (C++代码) 摘要:....非洲人就是我....完美避开解题思路: (最开始我甚至想到了用深搜来弄这题。)题目要求,两端序列,个元素匹配,从中得出两序列差绝对值最大的数的总和。 先思考一个问题,在 同一段 序…… 题解列表 2018年12月30日 0 点赞 0 评论 1571 浏览 评分:0.0
字符串排序 (C++代码)sort的第三个参数 摘要:解题思路: 利用sort的第三个参数,自定义一个排序序列方法,这里有一个注意事项。 使用cin进行输入的时候,会产生留下一个换行符在控制台之中(我们看不见的),然而我们使用c++的getl…… 题解列表 2018年12月30日 0 点赞 0 评论 3478 浏览 评分:0.0
蓝桥杯算法提高VIP-陶陶摘苹果2 (C++代码)我是一个不看题目的傻逼.. 摘要:解题思路:还剩多少个苹果!参考代码:#include<bits/stdc++.h> using namespace std; int main(){ int n,hight; while(…… 题解列表 2018年12月30日 0 点赞 0 评论 1356 浏览 评分:0.0
A+B for Input-Output Practice (II) (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b=0,n,count=0; scanf("%d ",&n); while(~sc…… 题解列表 2018年12月30日 0 点赞 0 评论 706 浏览 评分:0.0
A+B for Input-Output Practice (III) (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b=0,n,count=0; scanf("%d ",&n); while(~sc…… 题解列表 2018年12月30日 0 点赞 0 评论 627 浏览 评分:0.0
元素配对 (C++代码) 摘要:解题思路:思路很明显,要使差的绝对值最大,只需将一个序列的第i大与第二个序列的第i小配对即可。注意事项:本例输入较大,建议不使用输入流。参考代码:#include<cstdio>#include<al…… 题解列表 2018年12月30日 0 点赞 0 评论 961 浏览 评分:0.0
A+B for Input-Output Practice (IV) (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b=0,n,count=0; scanf("%d ",&n); while(~sc…… 题解列表 2018年12月30日 0 点赞 0 评论 651 浏览 评分:0.0
getchar( )和字符数组求个数 (C语言代码) 摘要:解题思路:#include <type.h>isalpha()是否是字母;isdigit()是否是数字注意事项:参考代码:#include <stdio.h> #include <ctype.h> …… 题解列表 2018年12月30日 1 点赞 0 评论 1165 浏览 评分:0.0