题解 2059: [STL训练]sort练习

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

筛选

2059: [STL训练]sort练习

摘要:#include <bits/stdc++.h> using namespace std; bool cmp(int &a,int &b){     return a>b; } in……

2059: [STL训练]sort练习

摘要:解题思路:注意事项:参考代码:n,m = map(int,input().split()) lis = list(map(int,input().split())) lis.sort(revers……

sort练习---python

解题思路:注意事项:参考代码:n,m=map(int,input().split())l=list(map(int,input().split()))#要把列表中的数设为Int型,才能适应sort()l.sort()l.reverse()foriinrange(m):print(l[i],

[STL训练]sort练习-题解(C++代码)

#sort排序法```cpp#include#include#includeusingnamespacestd;//修改默认排序方式boolcomp(constint&aa,constint&bb){returnaa>bb;}intmain(){intx[1000005];intn,