优质题解 元素配对 (C++代码) 摘要:....非洲人就是我....完美避开解题思路: (最开始我甚至想到了用深搜来弄这题。)题目要求,两端序列,个元素匹配,从中得出两序列差绝对值最大的数的总和。 先思考一个问题,在 同一段 序…… 题解列表 2018年12月30日 0 点赞 0 评论 1137 浏览 评分:0.0
字符串排序 (C++代码)sort的第三个参数 摘要:解题思路: 利用sort的第三个参数,自定义一个排序序列方法,这里有一个注意事项。 使用cin进行输入的时候,会产生留下一个换行符在控制台之中(我们看不见的),然而我们使用c++的getl…… 题解列表 2018年12月30日 0 点赞 0 评论 3012 浏览 评分:0.0
蓝桥杯算法提高VIP-陶陶摘苹果2 (C++代码)我是一个不看题目的傻逼.. 摘要:解题思路:还剩多少个苹果!参考代码:#include<bits/stdc++.h> using namespace std; int main(){ int n,hight; while(…… 题解列表 2018年12月30日 0 点赞 0 评论 768 浏览 评分: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 评论 487 浏览 评分: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 评论 467 浏览 评分:0.0
元素配对 (C++代码) 摘要:解题思路:思路很明显,要使差的绝对值最大,只需将一个序列的第i大与第二个序列的第i小配对即可。注意事项:本例输入较大,建议不使用输入流。参考代码:#include<cstdio>#include<al…… 题解列表 2018年12月30日 0 点赞 0 评论 688 浏览 评分: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 评论 465 浏览 评分:0.0
getchar( )和字符数组求个数 (C语言代码) 摘要:解题思路:#include <type.h>isalpha()是否是字母;isdigit()是否是数字注意事项:参考代码:#include <stdio.h> #include <ctype.h>…… 题解列表 2018年12月30日 1 点赞 0 评论 808 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题1.6 (C语言代码) 摘要:解题思路:一个接一个比较注意事项:不要弄混比较量参考代码:#include<stdio.h>int main(){ int a,b,c,max; scanf("%d%d%d",&a,&b,&c…… 题解列表 2018年12月30日 0 点赞 0 评论 425 浏览 评分:0.0
用筛法求之N内的素数。 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <stdlib.h> //Eratosthenes筛选法求素数 int main() { …… 题解列表 2018年12月30日 0 点赞 0 评论 616 浏览 评分:0.0