解题思路:
注意事项:
参考代码:
#include<iostream> #include<cstdio> #include<set> using namespace std; set<int> se; void setprint(int cnt){ for(set<int>::iterator it = se.begin(); it!= se.end(); it++) cout << *it << " "; puts(""); return ; } int main(){ int a,b,f; cin>>a; for(int i=0;i<a;i++){ cin>>f; se.insert(f); } b=se.size(); cout<<b<<endl; setprint(b); }
0.0分
1 人评分
C语言程序设计教程(第三版)课后习题10.2 (C语言代码)浏览:674 |
简单的a+b (C语言代码)浏览:726 |
校门外的树 (C语言代码)浏览:961 |
三角形 (C语言代码)浏览:915 |
字符逆序 (C语言代码)浏览:646 |
简单的a+b (C语言代码)浏览:488 |
罗列完美数 (C语言代码)浏览:491 |
用筛法求之N内的素数。 (C语言代码)浏览:533 |
整除问题 (C语言代码)浏览:526 |
C语言程序设计教程(第三版)课后习题1.6 (C语言代码)浏览:673 |