荣耀 (C++代码) 摘要:解题思路: 我是把0~9的晶体管数存到number的一维数组中 people数组是记录每组每个人分别的杀怪数量 题解列表 2018年12月30日 6 点赞 0 评论 1429 浏览 评分:9.9
优质题解 algorithm数据结构算法 元素配对 (C/C++语言代码) 摘要:解题思路:本题利用两个数组分别存储两组数据。我使用的是vector动态数组。要使得所有配对元素差的绝对值之和最大。可以将第一个数组中元素升序(或降序),第二个数组中元素降序(或升序)。如题目引例中n=…… 题解列表 2018年12月30日 9 点赞 1 评论 1221 浏览 评分:9.9
getchar( )和字符数组求个数 (C语言代码) 摘要:解题思路:#include <type.h>isalpha()是否是字母;isdigit()是否是数字注意事项:参考代码:#include <stdio.h> #include <ctype.h> …… 题解列表 2018年12月30日 1 点赞 0 评论 1142 浏览 评分: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 评论 630 浏览 评分:0.0
元素配对 (C++代码) 摘要:解题思路:思路很明显,要使差的绝对值最大,只需将一个序列的第i大与第二个序列的第i小配对即可。注意事项:本例输入较大,建议不使用输入流。参考代码:#include<cstdio>#include<al…… 题解列表 2018年12月30日 0 点赞 0 评论 940 浏览 评分: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 评论 609 浏览 评分: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 评论 671 浏览 评分:0.0
求所给范围内水仙花数并排列 (C++代码)C++多好嘛,就是爱用C++ 摘要:解题思路: 就是....便利....就完事了。参考代码:#include<bits/stdc++.h> using namespace std; int main(){ int n,m;…… 题解列表 2018年12月30日 1 点赞 3 评论 517 浏览 评分:9.9
蓝桥杯算法提高VIP-陶陶摘苹果2 (C++代码)我是一个不看题目的傻逼.. 摘要:解题思路:还剩多少个苹果!参考代码:#include<bits/stdc++.h> using namespace std; int main(){ int n,hight; while(…… 题解列表 2018年12月30日 0 点赞 0 评论 1313 浏览 评分:0.0
字符串排序 (C++代码)sort的第三个参数 摘要:解题思路: 利用sort的第三个参数,自定义一个排序序列方法,这里有一个注意事项。 使用cin进行输入的时候,会产生留下一个换行符在控制台之中(我们看不见的),然而我们使用c++的getl…… 题解列表 2018年12月30日 0 点赞 0 评论 3439 浏览 评分:0.0