编写题解 1165: 明明的随机数(C++)
摘要:解题思路:注意事项:参考代码:#include<iostream>
#include<cstdio>
#include<set>
using namespace std;
set<int> s……
去重,然后用插入排序
摘要:#include<stdio.h>
#include<string.h>
#include<malloc.h>
int main(){
int n;
int state = sc……
1165: 明明的随机数
摘要:解题思路:注意事项:参考代码:n = int(input())
l=set(map(int,input().split()))
l=list(l)
l.sort()
print(len(l))……
Hifipsysta-1165-明明的随机数(C++代码)基于STL的实现,我敢说这是本题最简单的代码
摘要:
```cpp
#include
#include
using namespace std;
int main(){
int n,tmp;
scanf("%d", &……
明明的随机数(Python代码) 3行完事 附解题思路
摘要:## 解题思路:
首先使用 ***列表推导式*** 来进行把 ***input().split()*** 分段后的列表元素转为 **int类型**,
接着使用 ***set()*** 直接转为……
1165: 明明的随机数
摘要:解题思路:先用数组装,然后排好序后,装入set,然后输出就好了注意事项:参考代码:#include<bits/stdc++.h>
using namespace std;
int main()
……