1738: 排序 (sort) 摘要:解题思路:使用sort()排序,注意使用头文件<bits/stdc++.h>或使用#include<algorithm>头文件sort(begin, end, cmp),其中b…… 题解列表 2025年03月01日 2 点赞 0 评论 622 浏览 评分:0.0
这个代码简单些 摘要:解题思路:注意事项:可以输入输出多组数据,列题有误导,所以要加上跳出条件参考代码:while True: try: n=…… 题解列表 2025年03月11日 0 点赞 0 评论 585 浏览 评分:0.0
三种方法:sort()+multiset容器+递归函数 摘要:解题思路:注意事项:注意题目说可能有多组测试数据,所以要使用循环输入,我就是刚开始没注意,根本不知道自己代码哪里出问题了-_-参考代码://sort()#include<iostream>…… 题解列表 2025年04月17日 0 点赞 0 评论 231 浏览 评分:0.0
1738: 排序 冒泡排序 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>#include<cmath>using namespace s…… 题解列表 2025年08月18日 0 点赞 0 评论 92 浏览 评分:0.0
Hifipsysta-1738-归并排序(C++代码)归并排序法 摘要:```cpp #include using namespace std; const int MXN=1e5+10; int arr[MXN]; int tmp[MXN]; void…… 题解列表 2022年03月08日 0 点赞 0 评论 330 浏览 评分:0.0
排序(超简单的sort排序) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int arr[200000]={0};int main(){ int n; wh…… 题解列表 2023年01月20日 0 点赞 0 评论 225 浏览 评分:0.0
实在是会的不用五分钟,不会的琢磨半天,考试咋办 摘要:解题思路:注意事项:参考代码:while True: try: n=input() ##p=[28.9,32.7,45.6,78,35,86.2,27.8,43,56…… 题解列表 2023年05月05日 0 点赞 2 评论 290 浏览 评分:0.0
编写题解 1738: 排序 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<vector>#include<algorithm>void print(v…… 题解列表 2022年04月20日 0 点赞 0 评论 289 浏览 评分:0.0
冒泡法排序(c语言) 摘要: #include <stdio.h> int main() { int n, a[123], i, j, t; while (scanf("%d", &n) !=…… 题解列表 2023年08月28日 0 点赞 0 评论 175 浏览 评分:0.0
题解 1738: 排序 摘要:解题思路:冒泡排序我首先定义的就是n,然后定义数组,输入,判断n对数据进行排序时需要两个变量i,j,不断遍历,每一次循环确定一个位置最后输出注意事项:我考虑了n的大小,冒泡排序的变量,可是一直出现错误…… 题解列表 2022年03月27日 0 点赞 0 评论 227 浏览 评分:0.0