View Code of Problem 3924

#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

int main(void)
{
    string s;
    char c;
    while((c = getchar()) != '\n'){
        if(s.find(c) == string :: npos){
            s += c;
        }   
    }
    cout << s << endl;
}

Double click to view unformatted code.


Back to problem 3924