华为机试题 明明的随机数

简介

简单

code

#include <iostream>
#include <algorithm>
#include <set>
using namespace std;

int main() {
    int n;
    int t;
    while(cin >> n){
        set<int> s;
        while(n--){
            cin >> t;
            s.insert(t);
        }
        for(auto it : s){
            cout << it << endl;
        }
    }
    return 0;
}
Hope is a good thing,maybe the best of things,and no good thing ever dies.----------- Andy Dufresne
原文地址:https://www.cnblogs.com/eat-too-much/p/14919030.html