解题思路:
注意事项:
参考代码:
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { int n; set<int> s; cin>>n; for(int i = 0;i < n;i++) { int t; cin>>t; s.insert(t); } set<int>::iterator it; cout<<s.size()<<endl; for(it = s.begin();it!=s.end();it++) { cout<<*it<<' '; } return 0; }
0.0分
0 人评分
剪刀石头布 (C语言代码)不知道怎么直接在scanf中用枚举变量浏览:1307 |
C语言程序设计教程(第三版)课后习题5.6 (C语言代码)浏览:501 |
计算质因子 (C++代码)浏览:1619 |
2005年春浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:582 |
【计算两点间的距离】 (C语言代码)浏览:1474 |
C语言程序设计教程(第三版)课后习题10.2 (C语言代码)浏览:1457 |
2004年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:583 |
【偶数求和】 (C语言代码)浏览:431 |
1050题解(结构体数组与结构体指针的使用)浏览:1107 |
蛇行矩阵 (C语言代码)浏览:498 |