题解 1169: 绝对值排序

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

筛选

编写题解 1169: 绝对值排序

摘要:解题思路:注意事项:参考代码:while True:    a = list(map(int,input().split()))    if a[0]==0:        break    else……

用sort函数解决问题

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool cmp(int a,int b){ return abs(a)>abs(b……

绝对值排序(C冒泡排序)

摘要:解题思路:    读题:输入n(n<=100)个整数,按照绝对值从大到小排序后输出。题目保证对于每一个测试实例,所有的数的绝对值都不相等。    输入格式:输入数据有多组,每组占一行,每行的第一个数字……

简单选择排序改动

摘要:解题思路:① 将if(a[j]<a[k]) 改成if(fabs(a[j])>fabs(a[k]))参考代码:#include<stdio.h> #include<math.h> void sele……

绝对值排序利用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)……