Submission

Status:

[PPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: whysosirius

Problemset: สตริงซ้ำซ้ำ

Language: cpp

Time: 0.003 second

Submitted On: 2026-10-11 14:46:25

#include <bits/stdc++.h>
using namespace std;

int main(){
    string a,b; cin >> a >> b;
    set<char> rep;
    for(int i=0;i<a.length();i++){
        for(int j=0;j<b.length();j++){
            if(a[i]==b[j]) rep.insert(a[i]);
        }
    }
    for(auto r : rep) cout << r << " ";

    return 0;
}