编写题解 1169: 绝对值排序 摘要:解题思路:注意事项:参考代码:while True: a = list(map(int,input().split())) if a[0]==0: break else…… 题解列表 2022年06月04日 0 点赞 0 评论 196 浏览 评分:0.0
绝对值排序(C语言) 摘要: #include int main() { int i, a[101], n; while(scanf("%d", &n)!=EOF) { fo…… 题解列表 2022年07月18日 0 点赞 0 评论 271 浏览 评分:0.0
用sort函数解决问题 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool cmp(int a,int b){ return abs(a)>abs(b…… 题解列表 2022年07月19日 0 点赞 0 评论 179 浏览 评分:0.0
绝对值排序(C冒泡排序) 摘要:解题思路: 读题:输入n(n<=100)个整数,按照绝对值从大到小排序后输出。题目保证对于每一个测试实例,所有的数的绝对值都不相等。 输入格式:输入数据有多组,每组占一行,每行的第一个数字…… 题解列表 2022年07月24日 0 点赞 0 评论 226 浏览 评分:0.0
简单选择排序改动 摘要:解题思路:① 将if(a[j]<a[k]) 改成if(fabs(a[j])>fabs(a[k]))参考代码:#include<stdio.h> #include<math.h> void sele…… 题解列表 2022年08月04日 0 点赞 0 评论 156 浏览 评分:0.0
绝对值排序(C语言)冒牌排序进行排列 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int i,j,x,t; while(scanf("%d",&x)!…… 题解列表 2022年08月22日 0 点赞 0 评论 146 浏览 评分:0.0
只有代码哦,但是思路比较简单 摘要:解题思路:注意事项:参考代码:import java.util.Arrays;import java.util.Scanner;public class Main { public static…… 题解列表 2022年09月14日 0 点赞 0 评论 207 浏览 评分:0.0
绝对值排序利用set容器 摘要:解题思路:去掉重复使用set容器注意事项:参考代码:# include <iostream> # include <set> # include <math.h> using namespace…… 题解列表 2022年10月15日 0 点赞 0 评论 106 浏览 评分:0.0
编写题解 1169: 绝对值排序—比较简单的方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<math.h> int main() { int n,i,j,a[100]; while(…… 题解列表 2022年11月01日 0 点赞 0 评论 148 浏览 评分:0.0
绝对值排序 代码少 摘要:while True: try: print(' '.join(sorted(input().split()[1:],key=lambda x:abs(int(x)…… 题解列表 2022年11月02日 0 点赞 0 评论 192 浏览 评分:0.0