题解 1165: 明明的随机数

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

明明的随机数

摘要:```c #include int main(){ int n,a[100],i,j,cnt=0,t; scanf("%d",&n); for(i=0;i……

用set去重并排序

摘要:解题思路:通过set关联容器,set中每个元素都唯一,且能根据元素的值自动排序。注意事项:参考代码:#include <bits/stdc++.h>  //万能头文件 using namespace ……

1165: 明明的随机数

摘要:解题思路:注意事项:参考代码:n = int(input()) l=set(map(int,input().split())) l=list(l) l.sort() print(len(l))……

【明明的随机数】 (C语言代码)

摘要:解题思路:先输入,然后调用函数,将其排序,最后删除相同的元素注意事项:参考代码:#include<stdio.h>#include<stdlib.h>#include<time.h>int fun(i……