字符串编码(C++) 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ string str; cin >> str; int …… 题解列表 2022年07月18日 0 点赞 0 评论 444 浏览 评分:0.0
[编程入门]选择排序 摘要:#include<stdio.h> int main() { int a[10],min,key,i,j; for(i=0;i<10;i++) { scanf("%d …… 题解列表 2022年07月19日 0 点赞 0 评论 209 浏览 评分:0.0
蓝桥杯算法提高VIP-复数求和(参考了上一题优质题解的代码改的,记录在案) 摘要:#include #include typedef struct plural { int real; int imag; struct plural *…… 题解列表 2022年07月19日 0 点赞 0 评论 264 浏览 评分:0.0
蓝桥杯算法训练VIP-链表数据求和操作(记录在案) 摘要:#include <stdio.h> #include <malloc.h> typedef struct plural { int real; int imag; …… 题解列表 2022年07月19日 0 点赞 0 评论 220 浏览 评分:0.0
求输入数据绝对值,简单 摘要:解题思路:注意事项:1.整型用abs,浮点型用fabs.参考代码:#include<stdio.h>#include<math.h>int main(){ double a; while(scanf(…… 题解列表 2022年07月19日 0 点赞 0 评论 305 浏览 评分:0.0
01背包算法求解 摘要:解题思路:注意事项:解疑!!!!参考代码:01背包算法的二维数组求解具体代码如下:#include <stdio.h>int Max(int a,int b){ if(a>b) r…… 题解列表 2022年07月19日 0 点赞 0 评论 382 浏览 评分:0.0
奇数个数简单利用字符串 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str[100],i,count=0; gets(str); fo…… 题解列表 2022年07月19日 0 点赞 0 评论 344 浏览 评分:0.0
用全排列函数next_permutation()解决 问题 摘要:解题思路:用三个for循环来找出三个不同的数的组合123 124 134 234在用next_permutation函数来输出注意事项:next_permutation不会输出原本的序列,所以用do-…… 题解列表 2022年07月19日 0 点赞 0 评论 328 浏览 评分:0.0
用sort函数解决问题 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool cmp(int a,int b){ return abs(a)>abs(b…… 题解列表 2022年07月19日 0 点赞 0 评论 321 浏览 评分:0.0
编写题解 1023: [编程入门]选择排序(简单) 摘要:解题思路:先建立一个for循环来遍历所有的数,定义一个min来每次的数,再用for循环来遍历后面 的数,遇到一个比min小的数,交换min的值同时保存下标。遍历结束,交换两个的值。这样保证了从前到后都…… 题解列表 2022年07月19日 0 点赞 0 评论 346 浏览 评分:0.0