1169: 绝对值排序(sort) 摘要:解题思路: 核心:l.sort(key=abs, reverse=True)注意事项: 去掉绝对值最大的数参考代码:while True: l = [int(x) for x i…… 题解列表 2024年08月17日 0 点赞 0 评论 254 浏览 评分:0.0
简简单单输入n(n<=100)个整数,按照绝对值从大到小排序后输出。题目保证对于每一个测试实例,所有的数的绝对值都不相等。 摘要:解题思路:注意事项:函数调用一大堆,哈哈哈就是面向对象参考代码:#include <iostream> #include <vector> #include <algorithm> #inclu…… 题解列表 2024年08月27日 0 点赞 0 评论 206 浏览 评分:0.0
1169: 绝对值排序 摘要:解题思路:归并排序注意事项:参考代码:#include<iostream> #include<cstring> #include<cmath> using namespace std; con…… 题解列表 2024年09月04日 0 点赞 0 评论 213 浏览 评分:0.0
C++:set容器+vector容器+更改set容器排列规则 摘要:解题思路:注意事项://修改方法2// 比较函数bool compare(int a, int b){ return a > b; // 这里定…… 题解列表 2025年04月29日 1 点赞 0 评论 83 浏览 评分:0.0