实在是会的不用五分钟,不会的琢磨半天,考试咋办 摘要:解题思路:注意事项:参考代码:while True: try: n=input() ##p=[28.9,32.7,45.6,78,35,86.2,27.8,43,56…… 题解列表 2023年05月05日 0 点赞 2 评论 367 浏览 评分:0.0
编写题解 1738: 排序 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<vector>#include<algorithm>void print(v…… 题解列表 2022年04月20日 0 点赞 0 评论 366 浏览 评分:0.0
1738: 排序 -希尔排序 摘要:**注意输入输出** ```python # 希尔排序 def shell_sort(nums): # 间隙初始为数组长度的一半 gap = len(nums) // 2 …… 题解列表 2024年10月28日 0 点赞 0 评论 530 浏览 评分:0.0
1738: 排序 -插入排序 摘要:注意事项: 注意输入输出参考代码:# 插入排序_升序 def insertion_sort(nums): # 遍历数组 for i in range(1, len(nums)):…… 题解列表 2024年10月27日 0 点赞 0 评论 481 浏览 评分:0.0
1738: 排序 -选择排序 摘要:注意事项:注意输入输出格式参考代码:def selection_sort(nums): length = len(nums) for i in range(length): …… 题解列表 2024年10月27日 0 点赞 0 评论 403 浏览 评分:0.0
1738: 排序题解 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<algorithm> using namespace std; int main() { int…… 题解列表 2024年10月09日 0 点赞 0 评论 521 浏览 评分:0.0
1738: 排序(C语言) 摘要:解题思路:冒泡排序算法暴力解决。注意事项:注意空格和多组输入。参考代码:#include<stdio.h>#define N 101int main(){ int a[N],n,t=0; int j,…… 题解列表 2023年01月17日 0 点赞 0 评论 258 浏览 评分:0.0
排序(超简单的sort排序) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int arr[200000]={0};int main(){ int n; wh…… 题解列表 2023年01月20日 0 点赞 0 评论 321 浏览 评分:0.0
java数组、排序、多组数据 摘要:参考代码:import java.util.Arrays; import java.util.Scanner; public class Main { public static vo…… 题解列表 2024年09月19日 0 点赞 0 评论 354 浏览 评分:0.0
题解 1738: 排序 摘要:解题思路:冒泡排序我首先定义的就是n,然后定义数组,输入,判断n对数据进行排序时需要两个变量i,j,不断遍历,每一次循环确定一个位置最后输出注意事项:我考虑了n的大小,冒泡排序的变量,可是一直出现错误…… 题解列表 2022年03月27日 0 点赞 0 评论 321 浏览 评分:0.0