字符串排序 (C++代码)sort的第三个参数 摘要:解题思路: 利用sort的第三个参数,自定义一个排序序列方法,这里有一个注意事项。 使用cin进行输入的时候,会产生留下一个换行符在控制台之中(我们看不见的),然而我们使用c++的getl…… 题解列表 2018年12月30日 0 点赞 0 评论 3219 浏览 评分:0.0
蓝桥杯算法提高VIP-陶陶摘苹果2 (C++代码)我是一个不看题目的傻逼.. 摘要:解题思路:还剩多少个苹果!参考代码:#include<bits/stdc++.h> using namespace std; int main(){ int n,hight; while(…… 题解列表 2018年12月30日 0 点赞 0 评论 967 浏览 评分: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 评论 568 浏览 评分: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 评论 518 浏览 评分:0.0
元素配对 (C++代码) 摘要:解题思路:思路很明显,要使差的绝对值最大,只需将一个序列的第i大与第二个序列的第i小配对即可。注意事项:本例输入较大,建议不使用输入流。参考代码:#include<cstdio>#include<al…… 题解列表 2018年12月30日 0 点赞 0 评论 809 浏览 评分: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 评论 540 浏览 评分:0.0
getchar( )和字符数组求个数 (C语言代码) 摘要:解题思路:#include <type.h>isalpha()是否是字母;isdigit()是否是数字注意事项:参考代码:#include <stdio.h> #include <ctype.h> …… 题解列表 2018年12月30日 1 点赞 0 评论 952 浏览 评分: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 评论 486 浏览 评分:0.0
用筛法求之N内的素数。 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <stdlib.h> //Eratosthenes筛选法求素数 int main() { …… 题解列表 2018年12月30日 0 点赞 0 评论 794 浏览 评分:0.0
题解1066 Algorithm算法 两个函数轻松解决 (C语言代码) 摘要:解题思路:根据题目意思,写两个function即可!在C语言math.h库文件中本来就有x的n次方的函数pow()。因此在mypow函数中只需要将其返回即可。注意事项: x - x2/2! + x3…… 题解列表 2018年12月30日 1 点赞 0 评论 817 浏览 评分:0.0