题解 1738: 排序

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

筛选

1738: 排序 C++!

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

排序(挺细的一道题)

摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main {     public static void main(String[……

冒泡法排序(c语言)

摘要: #include <stdio.h> int main() {     int n, a[123], i, j, t;       while (scanf("%d", &n) !=……

这个代码简单些

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

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

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

排序 (C++代码)(非STL的SORT)

摘要:解题思路:这是一种分治思维,现将所排序选择的数字定位,再将左右两边的数用递归的方式再度进行这样的排序,此排序的时间复杂度为O(NlogN)注意事项:参考代码:(请不要直接抄袭)#include<bit……

排序 (C语言代码)

摘要:解题思路:排序都行!主要是循环输入!注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){     int……