C++代码纯手写,采用实参宏定义函数交换2个字符串。字符串两两比较,自定义函数for循环,遍历实现字符串逐位比较,返回大小比较结果,立刻交换即可。保证str1<=str2<=str3 摘要:也许会有朋友说写那么复杂干什么,直接调用一个库函数进行比较多方便。一些基本但复杂的东西,C/C++的乐趣就在此。用python直接调用库函数最简洁。解题思路:C++代码纯手写,采用实参宏定义函数交换2…… 题解列表 2021年12月29日 0 点赞 0 评论 629 浏览 评分:0.0
1771: [编程入门]链表之节点删除 摘要:解题思路:注意事项:参考代码:m,n = map(int,input().split()) a={} b={} c=[] for i in range(m): k,l = map(i…… 题解列表 2021年12月29日 0 点赞 0 评论 206 浏览 评分:2.0
python 一行代码 摘要:参考代码: print(" ".join(str(i) for i in(sorted(list(map(int,input().split()))))))用了三个python内置函数以及迭代输出…… 题解列表 2021年12月29日 0 点赞 0 评论 514 浏览 评分:9.9
1723: 求最大值-C语言 (归并排序) 摘要:```c //求最大值 #include #include void sort(int arr[], int temparr[], int left, int right); voi…… 题解列表 2021年12月29日 0 点赞 0 评论 249 浏览 评分:9.9
因同查找---for 摘要:解题思路:从10到1000注意事项:参考代码:#include <stdio.h>int main(){ int i=10; scanf("%d",&i); for (i=10;i<=1000;i++…… 题解列表 2021年12月29日 0 点赞 6 评论 867 浏览 评分:9.9
1674: 数据结构-有序线性表的有序合并-C语言 摘要:```c //有序线性表的有序合并 //思路是合并后对合并后的链表进行排序 #include #include typedef struct node { int data;…… 题解列表 2021年12月29日 0 点赞 0 评论 591 浏览 评分:9.9
1675: 数据结构-Big Bang-C语言 摘要:```c #include #include #include #define max 20 typedef struct node{ char name[max]; …… 题解列表 2021年12月29日 0 点赞 0 评论 246 浏览 评分:9.9
2284-耐摔指数(动态规划)-c语言 摘要:#include<stdio.h> #define M 20000 int max(int a,int b) { return a>b?a:b; } int min(int a,int …… 题解列表 2021年12月29日 0 点赞 0 评论 1093 浏览 评分:9.9
比较基础的一题 摘要:解题思路:注意事项:参考代码:// 从键盘输入任意20个整型数,统计其中的负数个数并求所有正数的平均值。// 保留两位小数#include <stdio.h>int main(){ int n …… 题解列表 2021年12月29日 0 点赞 0 评论 557 浏览 评分:9.9
1770: [编程入门]链表之报数问题 摘要:解题思路:所有人看成一个列表,报到3时出圈看成3之前的人移到列表最后去,继续报3再移到后面去直到只乘2人,第一个报1和3出圈 n = int(input()) if n ==1: pri…… 题解列表 2021年12月29日 0 点赞 2 评论 376 浏览 评分:6.0