Submission

Status:

[PPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: picture

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

Language: cpp

Time: 0.002 second

Submitted On: 2026-10-12 09:35:00

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

int main(){
    string n, m;
    cin >> n >> m;

    set<char> st(n.begin(), n.end());
    set<char> sv(m.begin(), m.end());

    for(char c : st){
        if(sv.count(c)){          
            cout << c << " ";
        }
    }
    cout << endl;
}