Submission

Status:

[P-SSSSSS]

Subtask/Task Score:

{0/100}

Score: 0

User: Catpao

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-09-26 19:19:09

#include<bits/stdc++.h>
using namespace std;
int cnt1[1000],cnt2[1000];
int main()
{
	int max;
	string a,b;
	cin>>a;
	cin>>b;
	if(a.size() >= b.size()){
		max = a.size();
	}
	else if(b.size() > a.size()){
		max = b.size();
	}
	for(int i=0;i<max;i++){
		for(int j=0;j<max;j++){
			if(max = a.size()){
				if(a[i] == b[j]){
					cout<<a[i]<<' ';
				}
			}
			else if(max = b.size()){
				if(b[i] == a[j]){
					cout<<b[i]<<' ';
				}
			}
		}
	}
}