set去重且排序(sf12b) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ set<int>myset; //s…… 题解列表 2025年06月02日 0 点赞 0 评论 22 浏览 评分:0.0
求解阿明的随机数 摘要:解题思路:纯用循环注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%…… 题解列表 2025年05月24日 1 点赞 0 评论 45 浏览 评分:10.0
明明的随机数(set容器自动排序和去重) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){&…… 题解列表 2025年05月01日 1 点赞 0 评论 126 浏览 评分:10.0
明明的随机数(使用unordered_set和sort) 摘要:> unordered_set可以去重,但是不能用cin输入,要用**insert**> sort排序,默认升序。***unordered_set不能用sort***,先复制到vector中…… 题解列表 2025年02月21日 2 点赞 0 评论 232 浏览 评分:0.0
排序+去重 摘要:解题思路:注意事项:参考代码:#include<stdio.h>intmain(){ intnumber[100]; intn,…… 题解列表 2025年01月06日 1 点赞 0 评论 312 浏览 评分:0.0
1102: 明明的随机数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;set<int>st;int main(){ int n,m; cin…… 题解列表 2024年11月08日 0 点赞 0 评论 323 浏览 评分:10.0
明明的随机数 摘要:```cpp include include include include using namespace std; const int N = 110; int n; in…… 题解列表 2024年11月03日 1 点赞 0 评论 272 浏览 评分:9.9
明明的随机数 摘要:解题思路:注意事项:参考代码:int main(){ //输入 int n = 0; scanf("%d", &n); //将每一个数字作为下标,将其对应的数组空间内置成数字的值 int input …… 题解列表 2024年08月22日 1 点赞 0 评论 234 浏览 评分:0.0
明明的随机数C++,使用vector函数 摘要:解题思路:利用vector容器设置数组先去重在排序,使用选择排序参考代码:#include<iostream>#include<vector>using namespace std;//选择排序voi…… 题解列表 2024年08月12日 0 点赞 0 评论 173 浏览 评分:0.0
1102: 明明的随机数 摘要:解题思路:题目描述:给定一个无序的整数序列,编写一个程序实现插入排序算法,对整数序列进行从小到大的排序,并输出排序后的整数个数和排序后的整数序列。输入格式:第一行输入一个整数N,表示整数序列的长度;接…… 题解列表 2024年07月12日 0 点赞 0 评论 244 浏览 评分:0.0