题解 | #明明的随机数#

明明的随机数

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

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

int main() {
    set<int> sElement;
    string iCount;
    int b;
    getline(cin, iCount);
    while (cin >> b) 
    { // 注意 while 处理多个 case
        sElement.insert(b);
    }
    set<int>::iterator it = sElement.begin();
    for(;it != sElement.end();++it)
    {
        cout << *it << endl;
    }

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

#华为算法题#
全部评论

相关推荐

面试拷打成m:我感觉他说的挺对的,感觉我找不到工作也要去送外卖了,至少饿不死
点赞 评论 收藏
分享
10-15 20:01
已编辑
上海大学 Java
钉钉什么垃圾公司,约面鸽人
Syca_:途虎养车给我定了我这边早上六点的笔试,睡了四个小时起来难受的要命,告诉我面试时间是两天后的凌晨四点
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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