编写题解 1023: [编程入门]选择排序-STL-set容器 摘要:解题思路:利用STL中的set容器,会自动按照升序的排列方式进行存储,所以在插入数值后可以直接输出。set和multiset属于关联式容器,底层结构是用二叉树实现的。注意事项:要用multiset,s…… 题解列表 2022年04月17日 0 点赞 0 评论 384 浏览 评分:0.0
编写题解 1023: [编程入门]选择排序-利用STL内置的算法 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<vector>#include<algorithm>void print(v…… 题解列表 2022年04月17日 0 点赞 0 评论 318 浏览 评分:0.0
自定义函数处理素数 摘要:解题思路:素数是只能被1和自身整除的数注意事项:i要小于a参考代码:#include<stdio.h>void prime(int a) { int count = 0; if (a < …… 题解列表 2022年04月17日 0 点赞 0 评论 329 浏览 评分:0.0
编写题解 1402: 简单的字符串 摘要:解题思路:字符数组用来作比较,数组用来计数。记得加判断注意事项:参考代码:#include<iostream>using namespace std;#include<string>int main(…… 题解列表 2022年04月18日 0 点赞 0 评论 352 浏览 评分:0.0
编写题解 1477: 字符串输入输出函数 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<string>void printnum(){ cout<<"plea…… 题解列表 2022年04月18日 0 点赞 0 评论 262 浏览 评分:0.0
1575: 蓝桥杯算法提高VIP-递归倒置字符数组 摘要:解题思路:注意事项:参考代码:#include <stdio.h> void digui(char *str, int m, int n) { if(n <= m) {…… 题解列表 2022年04月18日 0 点赞 0 评论 228 浏览 评分:0.0
编写题解 1509: 蓝桥杯算法提高VIP-图形输出 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ cout<<" X | X | X "<<endl; co…… 题解列表 2022年04月18日 0 点赞 0 评论 289 浏览 评分:0.0
编写题解 1486: 蓝桥杯算法提高VIP-一元一次方程 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){ double a,b; …… 题解列表 2022年04月18日 0 点赞 0 评论 331 浏览 评分:0.0
自定义函数处理最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码:def max_min(m,n): lst = [] for i in range(1,m): if m%i==0: ls…… 题解列表 2022年04月19日 0 点赞 0 评论 312 浏览 评分:0.0
循环处理素数 摘要:解题思路:注意事项:参考代码:a = int(input())lst = []for i in range(1,a): if a%i==0: lst.append(i)if len…… 题解列表 2022年04月19日 0 点赞 0 评论 457 浏览 评分:0.0