题解 1738: 排序

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

筛选

排序 (C++代码)

摘要:解题思路:注意事项:参考代码:#include<cstdio>int arr[100];void swap(int &a,int& b){ int temp=a; a=b; b=temp;}void ……

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

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

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

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

1738: 排序 (sort)

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

快速排序解决

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

 编写题解 1738: 排序

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<vector>#include<algorithm>void print(v……

排序(超简单的sort排序)

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int arr[200000]={0};int main(){  int n; wh……

1738: 排序题解

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<algorithm> using namespace std; int main() {     int……

1738: 排序 C++!

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