题解 | #提取不重复的整数#

提取不重复的整数

https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1

//https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1?tpId=37&tqId=21232&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D37&difficulty=undefined&judgeStatus=undefined&tags=&title=

#include <iostream>
#include <algorithm>

using namespace std;

bool used[58];

int main() {
    string s;

    while (cin >> s) {
        reverse(s.begin(), s.end());

        for(auto c:s){
            if(!used[c]){
                used[c] = 1;
                cout << c;
            }
        }

         cout << endl;
    }
}

全部评论

相关推荐

不愿透露姓名的神秘牛友
今天 11:30
点赞 评论 收藏
分享
小叮当411:应该是1-3个月吧
点赞 评论 收藏
分享
陆续:不可思议 竟然没那就话 那就我来吧 :你是我在牛客见到的最美的女孩
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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