绝对值排序(python) 摘要:解题思路:注意事项:参考代码:while True: nums = list(map(int, input().split())) n = nums[0] if n == 0: …… 题解列表 2023年12月18日 0 点赞 0 评论 156 浏览 评分:0.0
二维数组,第一列为数字的绝对值,第二列为正负的标志,-1为负,1为正,最后输出时,每行两个数字相乘即可 摘要:解题思路:注意事项:参考代码:import java.util.*; public class Main { public static void main(String[] args…… 题解列表 2024年02月28日 0 点赞 0 评论 146 浏览 评分:0.0
绝对值排序(STL秒了) 不需要用队列 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h> using namespace std; bool cmp(int &x,int &y){ return ab…… 题解列表 2024年02月29日 0 点赞 0 评论 131 浏览 评分:0.0
绝对值排序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool cmp(int a,int b){ return abs(a)>ab…… 题解列表 2024年03月03日 0 点赞 0 评论 154 浏览 评分:0.0
用冒泡排序做的,没有时间超限 摘要:解题思路:注意事项:参考代码:while True: li=list(map(int,input().split())) if li[0]==0: break else…… 题解列表 2024年03月11日 0 点赞 0 评论 138 浏览 评分:0.0
小白随便写的,记录一下 摘要:```python def solve_sort(li): new_li = list(map(int, li[1:])) new_li.sort(key=abs, revers…… 题解列表 2024年03月24日 0 点赞 0 评论 355 浏览 评分:0.0
1169: 绝对值排序 摘要:解题思路:注意事项:参考代码:while True: try: n = list(map(int, input().split())) a = n[1:]…… 题解列表 2024年04月08日 0 点赞 0 评论 186 浏览 评分:0.0
无聊的星期六 摘要:解题思路: 将读取的字符串放到数组里面,删除第一个数字 生成两个列表,一个放负数,一个放排序好的 判断两个表哪几个值一样然后替换掉他的负数注意事项: 属于是有点脱裤子放屁,但是…… 题解列表 2024年04月14日 0 点赞 0 评论 212 浏览 评分:0.0
1169 绝对值排序(sort排序) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>#include<cmath>using namespace std;bool compare(…… 题解列表 2024年07月10日 0 点赞 0 评论 119 浏览 评分:0.0
1169: 绝对值排序 摘要:```cpp #include using namespace std; bool cmp(int x,int y){ return abs(x)>abs(y); } int px…… 题解列表 2024年08月01日 0 点赞 0 评论 166 浏览 评分:0.0