Submission

Status:

[PPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: .n0t_gloomy.

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

Language: cpp

Time: 0.002 second

Submitted On: 2025-09-29 20:49:53

#include <bits/stdc++.h>
using namespace std;
int main()
{
    string a,b;
    cin>>a>>b;
    set<char> s;
    for (char c : a)
    {
        for (char d : b)
        {
            if (c == d)
            {
                s.insert(c);
                break;
            }
        }
    }
    for (char x : s)
    {
        cout<<x<<" ";
    }
}