题解 | #明明的随机数#
明明的随机数
https://www.nowcoder.com/practice/3245215fffb84b7b81285493eae92ff0
#include <iostream>
#include <set>
using namespace std;
int main() {
int N;
cin >> N;
set<int> _set;
int temp;
for (int i = 0; i < N; i++) {
cin >> temp;
_set.insert(temp);
}
for (set<int>::iterator it = _set.begin(); it != _set.end(); it++) {
cout << *it << endl;
}
}
// 64 位输出请用 printf("%lld")
#华为OD机试真题#华为OD机测试题 文章被收录于专栏
个人练习专栏
查看12道真题和解析
