题解 | #明明的随机数#

明明的随机数

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

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

int main() {
    int N;
    while (cin>>N) {
        set<int>s;
        while(N--) {
            int d;
            cin>>d;
            s.insert(d);
        }
        for(set<int>::iterator ite = s.begin();ite!=s.end();ite++)
        {
            cout<<*ite<<endl;
        }
    } 
}
// 64 位输出请用 printf("%lld")

全部评论

相关推荐

05-23 19:02
吉林大学 Java
点赞 评论 收藏
分享
身边有人上海、深圳&nbsp;6、7k&nbsp;都去了,真就带薪上班了。
程序员小白条:木的办法, 以后越来越差,还是家附近宅着吧,毕业的人越来越多,岗位都提供不出来,经济又过了人口红利期
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务