Submission

Status:

[PPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: Bestzu

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

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-04 23:39:28

#include <bits/stdc++.h>
#define endl '\n'
using namespace std;



int main() {
    ios::sync_with_stdio(false); cin.tie(0);

    string a, b; cin >> a >> b;
    set<char> s(a.begin(), a.end());
    set<char> ss(b.begin(), b.end());
    for(auto c : s) {
        if(ss.count(c)) cout << c << " ";
    }

    return 0;
}