题解 1169: 绝对值排序

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

筛选

借用二维数组解决多行的绝对值排序

摘要:解题思路:这里主要是多行问题。如果单行很简单了。 使用二维数组,一行表示一组输入数据。其中第一个(a[i][0])保存的是这一组总共有多少个数据,真正的数据从a[i][1]开始注意事项: 二维数组的第……

绝对值排序---抽象JAVA

摘要:解题思路:TreeSet去重,排序Comparator 绝对值排序注意事项:无参考代码:import java.util.*;public class Main { public static voi……

一个笨方法

摘要:一个笨方法cpp ```cpp #include #include using namespace std; int main() { int n,x3[20][20],num[20]; ……

绝对值排序

摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<math.h> #define N 30 void sort(int arr[],int n) {    ……

绝对值排序

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#include<string.h>void sort(int a[100],int len){ int……

使用C++STL库中的优先队列

摘要:解题思路:使用C++中的STL库中的优先队列,使用结构体定义一个比较函数进行排序,之后在主函数中使用优先队列输出注意事项:注意结构体里边比较逻辑的写法,这是容易出错的地方参考代码:#include<i……

绝对值排序(python)

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