1738: 排序 -希尔排序 摘要:**注意输入输出** ```python # 希尔排序 def shell_sort(nums): # 间隙初始为数组长度的一半 gap = len(nums) // 2 …… 题解列表 2024年10月28日 0 点赞 0 评论 455 浏览 评分:0.0
用函数来完成甲流病人初筛 摘要:解题思路:先定义用于筛选的函数体,再在主函数中进行调用注意事项:函数体中,数值是不能够直接进行传递的,如果想传递到主函数中,要用指针参考代码:#include <stdio.h> voi…… 题解列表 2024年10月27日 0 点赞 0 评论 282 浏览 评分:9.9
1038: [编程入门]宏定义练习之三角形面积 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#define F(a,b,c) S=(a+b+c)/2#define P(a,b,c) area=sq…… 题解列表 2024年10月27日 2 点赞 0 评论 1010 浏览 评分:10.0
1738: 排序 -插入排序 摘要:注意事项: 注意输入输出参考代码:# 插入排序_升序 def insertion_sort(nums): # 遍历数组 for i in range(1, len(nums)):…… 题解列表 2024年10月27日 0 点赞 0 评论 424 浏览 评分:0.0
1738: 排序 -选择排序 摘要:注意事项:注意输入输出格式参考代码:def selection_sort(nums): length = len(nums) for i in range(length): …… 题解列表 2024年10月27日 0 点赞 0 评论 338 浏览 评分:0.0
1025 数组插入处理 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define N 9 void insert(int* arr,int n,int value) //定义一个插入…… 题解列表 2024年10月27日 0 点赞 0 评论 197 浏览 评分:9.9
编写题解 1078: Repairing a Road 摘要:解题思路:注意事项:要用#include<iomanip>#include<cstring>#include<cmath>#include<algorithm>c++文件头参考代码:#include<…… 题解列表 2024年10月27日 0 点赞 0 评论 269 浏览 评分:9.9
Java快速幂BigInteger 摘要:参考代码:import java.math.BigInteger; import java.util.Scanner; public class Main{ public static …… 题解列表 2024年10月27日 1 点赞 0 评论 431 浏览 评分:0.0
用简单的思路解决 自定义函数之整数处理 (C语言) 摘要:解题思路:我的解题思路比较简单,具体实现方法为:1.创建一个数组,用于输入10个整数,之后将这10个整数进行排序,并储存进另一个数组里。2.此时另一个数组里的第一项为最小值,最后一项为最大值,这样就找…… 题解列表 2024年10月27日 0 点赞 1 评论 303 浏览 评分:9.9
方格取数 双线程dp 摘要: #include #include using namespace std; int map[15][15]={0}; int dp[15][15][1…… 题解列表 2024年10月27日 1 点赞 0 评论 272 浏览 评分:9.9