解题思路:
注意事项:
参考代码:
#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 人评分
字符串输入输出函数 (Java代码)浏览:1450 |
C语言训练-阶乘和数* (C语言代码)-------- 呆板写法浏览:1376 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:592 |
C语言程序设计教程(第三版)课后习题5.5 (C语言代码)浏览:559 |
A+B for Input-Output Practice (V) (C语言代码)浏览:476 |
矩阵乘方 (C语言代码)浏览:1038 |
蓝桥杯历届试题-翻硬币 (C++代码)浏览:893 |
交换Easy (C语言代码)浏览:773 |
C语言程序设计教程(第三版)课后习题12.5 (C语言代码)浏览:771 |
简单的a+b (C语言代码)浏览:474 |