题解 1738: 排序

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

快速排序解决

摘要:解题思路:多组测试数据可以利用输入的返回值体现,当有输入n的操作的时候才进行对下一行n个数据进行排序注意事项:快排别写错,注意换行参考代码:#include<iostream>#inclu……

1738: 排序 (sort)

摘要:解题思路:使用sort()排序,注意使用头文件<bits/stdc++.h>或使用#include<algorithm>头文件sort(begin, end, cmp),其中b……

这个代码简单些

摘要:解题思路:注意事项:可以输入输出多组数据,列题有误导,所以要加上跳出条件参考代码:while True: try: n=……

三种方法:sort()+multiset容器+递归函数

摘要:解题思路:注意事项:注意题目说可能有多组测试数据,所以要使用循环输入,我就是刚开始没注意,根本不知道自己代码哪里出问题了-_-参考代码://sort()#include<iostream>……

无聊的星期六

摘要:try:     while input()!=&#39;&#39;:         z=input()         z=list(map(int,z.split()))        ……

  编写题解 1738: 排序

摘要:package test; //题目 1738: 排序 import java.util.Scanner; public class t_1738 { public static void ……

1738: 排序(C语言)

摘要:解题思路:冒泡排序算法暴力解决。注意事项:注意空格和多组输入。参考代码:#include<stdio.h>#define N 101int main(){ int a[N],n,t=0; int j,……

排序-题解(C++代码)

摘要:这题我用的是快速排序。 ```cpp #include using namespace std; #define N 1000 void swap(int * a,int i,int j) ……

1738: 排序 C++!

摘要:解题思路:std::sort   最坏时间复杂度0(nlogn)注意事项:参考代码:#includeusing namespace std;int a[5000];int main(){ int n;……