Submission

Status:

[PPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: bestisyis...programming

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

Language: cpp

Time: 0.002 second

Submitted On: 2026-10-07 19:45:47

#include <iostream>
using namespace std;
int main(){
	string sent1,sent2;
	cin >> sent1 >> sent2;
	int a[256]={0};
	for(int i=0;i<sent2.length();i++){
		for(int j=0;j<sent1.length();j++){
			if(sent2[i]==sent1[j]){
				if(a[sent1[j]]==0){
					cout << sent1[j] << ' ';
					a[sent1[j]]++;
				}
			}
		}
	}
}