题解 | #明明的随机数#

明明的随机数

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

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

const int N = 1010;

int main() {
    int n, a;
    set<int> s;
    cin >> n;
    while (n--) {
        cin >> a;
        s.insert(a);
    }

    for (auto it = s.begin(); it != s.end(); it++)
        cout << *it << endl;

    return 0;
}
// 64 位输出请用 printf("%lld")

全部评论

相关推荐

牛客246576843号:建议简历对点优化,想做HR专门列出HR实习,想做运营专门列出运营实习,并且对点写出项目经历以及数据,同时在个人总结上可以多凸出和岗位的匹配度
点赞 评论 收藏
分享
我的名字是句号:接好运
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务