编写题解 1169: 绝对值排序—比较简单的方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<math.h> int main() { int n,i,j,a[100]; while(…… 题解列表 2022年11月01日 0 点赞 0 评论 147 浏览 评分:0.0
绝对值排序利用set容器 摘要:解题思路:去掉重复使用set容器注意事项:参考代码:# include <iostream> # include <set> # include <math.h> using namespace…… 题解列表 2022年10月15日 0 点赞 0 评论 105 浏览 评分:0.0
绝对值排序 摘要:解题思路:冒泡排序注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){ int n; whi…… 题解列表 2022年09月23日 0 点赞 0 评论 162 浏览 评分:7.0
只有代码哦,但是思路比较简单 摘要:解题思路:注意事项:参考代码:import java.util.Arrays;import java.util.Scanner;public class Main { public static…… 题解列表 2022年09月14日 0 点赞 0 评论 207 浏览 评分:0.0
绝对值排序问题(代码不多,但是要注意题目要求,防止输出超限)(冒泡) 摘要:解题思路:首先回顾一下题目的输入格式与输出格式要求输入:输入数据有多组,每组占一行,每行的第一个数字为n,接着是n个整数,n=0表示输入数据的结束,不做处理。输出:对于每个测试实例,输出排序后的结果,…… 题解列表 2022年09月01日 0 点赞 0 评论 216 浏览 评分:6.0
绝对值排序(C语言)冒牌排序进行排列 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int i,j,x,t; while(scanf("%d",&x)!…… 题解列表 2022年08月22日 0 点赞 0 评论 145 浏览 评分: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 评论 155 浏览 评分:0.0
绝对值排序(C冒泡排序) 摘要:解题思路: 读题:输入n(n<=100)个整数,按照绝对值从大到小排序后输出。题目保证对于每一个测试实例,所有的数的绝对值都不相等。 输入格式:输入数据有多组,每组占一行,每行的第一个数字…… 题解列表 2022年07月24日 0 点赞 0 评论 225 浏览 评分: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 评论 178 浏览 评分:0.0
题解 1169: 绝对值排序 摘要:#include<stdio.h> #include<math.h> int main() { int i,j,t,n; while(scanf("%d",&n)!=EO…… 题解列表 2022年07月18日 0 点赞 0 评论 183 浏览 评分:7.0