1165: 明明的随机数 摘要:```cpp #include using namespace std; int main() { int a,s1[100],s2[100],s=0,x=1,j; cin…… 题解列表 2022年11月13日 0 点赞 0 评论 108 浏览 评分:9.9
编写题解 1165: 明明的随机数(C++) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstdio> #include<set> using namespace std; set<int> s…… 题解列表 2021年12月12日 0 点赞 0 评论 277 浏览 评分:9.9
1165: 明明的随机数 摘要:解题思路:先用数组装,然后排好序后,装入set,然后输出就好了注意事项:参考代码:#include<bits/stdc++.h> using namespace std; int main() …… 题解列表 2022年04月03日 0 点赞 0 评论 220 浏览 评分:9.9
使用STL set容器进行解题 摘要:解题思路:先定义一个整型数组,从键盘赋值,然后再插入到set容器中,set 本身就可以达到去重,而且默认升序注意事项:参考代码: #include<iostream>#include<set>i…… 题解列表 2022年04月29日 0 点赞 0 评论 236 浏览 评分:9.9
明明的随机数-题解(C++桶排序) 摘要:解题思路:用桶排序,既能记数又能排序注意事项:桶排序适用于要排序的数不大且又密集的情况参考代码:#include<iostream> using namespace std; int main()…… 题解列表 2021年01月27日 0 点赞 0 评论 449 浏览 评分:9.9
先排序再筛选出相同的数,然后再跳过。 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>//万能头文件using namespace std;int main(){ int a[1000],b[1000]…… 题解列表 2022年07月23日 0 点赞 2 评论 124 浏览 评分:9.9
明明的随机数-不用排序和去重-超简洁(C++代码) 摘要:**这里采用:牺牲额外空间来免去排序和去重操作** **** **即:开辟一个1000长度的数组并初始值都为1,遇到一个随机数就把数组值赋值为0.** **结果:输出数组值为0的下标即可** …… 题解列表 2020年05月24日 0 点赞 0 评论 624 浏览 评分:9.9
明明的随机数 (C++代码) 摘要:卑微萌新 做的麻烦了。-- #include using namespace std; int main(){ int a; cin>>a; int s1[100],s2[1…… 题解列表 2020年04月04日 0 点赞 0 评论 532 浏览 评分:9.9
明明的随机数-题解(C++代码) 摘要:通过利用STL的set容器来自动降重排序 代码如下: ```cpp #```cpp #include #include using namespace std; int main()…… 题解列表 2020年03月16日 0 点赞 1 评论 172 浏览 评分:9.9