题解 1169: 绝对值排序

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

筛选

绝对值排序

摘要:解题思路:冒泡排序注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){    int n;    whi……

绝对值排序利用set容器

摘要:解题思路:去掉重复使用set容器注意事项:参考代码:# include <iostream> # include <set> # include <math.h> using namespace……

绝对值排序 代码少

摘要:while True:    try:        print(&#39; &#39;.join(sorted(input().split()[1:],key=lambda x:abs(int(x)……

1169基础解法(Python)

注意事项:因为sys.stdin直接读取输入流,则第一项是什么对我们而言不太重要,只需要判断这个列表是否为空即可因为是绝对值的大小排序,选用sorted()函数中的key参数设定排序的指标为abs()绝对值,从大到小输出选用reverse=True最后输出即可(输出的实现方式多种多样)参考代码:imp

C++STL之Priority_queue(优先队列)

摘要:解题思路:C++STL之Priority_queue(优先队列)注意事项:参考代码:#include<iostream>#include<queue>#include<vector>#include<……

1169: 绝对值排序

```cpp#include#include#defineINT_MAX2147483647usingnamespacestd;intmain(){intnums[200],nums_len=0,nums_buff[30],num_len=0,

1169: 绝对值排序(c++)

摘要:```cpp #include using namespace std; //自定义排序规则 bool cmp(int x,int y){ return fabs(x)>fabs(y……