题解 | #明明的随机数#

明明的随机数

https://www.nowcoder.com/practice/3245215fffb84b7b81285493eae92ff0

//https://www.nowcoder.com/practice/3245215fffb84b7b81285493eae92ff0?tpId=37&rp=1&ru=%2Fexam%2Foj%2Fta&qru=%2Fexam%2Foj%2Fta&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D37&difficulty=&judgeStatus=&tags=&title=&gioEnter=menu

#include <iostream>
#include <set>

using namespace std;

int main() {
    int n = 0;

    while (cin >> n) {
        set<int> num;
        int tem = 0;

        for(int i = 0;i<n;i++){
            cin >> tem;

            num.insert(tem);
        }

        for(auto c:num)
            cout << c << endl;
    }
}

全部评论

相关推荐

牛客868257804号:九个中铁八个中建
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务