Submission

Status:

[P-SSSSSS]

Subtask/Task Score:

{0/100}

Score: 0

User: NovemNotes

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-09-28 15:27:39

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

int main(){
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    string s;cin >> s;
    unordered_set<char> c;
    for(auto &x:s)c.insert(x);
    cin >> s;
    for(auto &x:s){
        if(c.find(x) != c.end()){
            cout << x << " ";
        }
    }
    return 0;
}