Submission

Status:

[P-SSSSSS]

Subtask/Task Score:

{0/100}

Score: 0

User: Krovmoroz

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

Language: cpp

Time: 0.002 second

Submitted On: 2025-11-06 11:14:38

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

int main() {
  ios::sync_with_stdio(false); cin.tie(nullptr);
  string a,b;
  set<char> s;
  cin >> a >> b;
  
  for (char c:a) s.insert(c);
  for (char c:b) {
    if (s.count(c)) cout << c << ' ';
  }
}