PAT乙级1063

题目链接

实现

#include <iostream>
#include <cstdio>
#include <string>

using namespace std;


int main()
{
	bool isExist[128] = { false };
	int count = 2;
	char ch;
	string A, B;
	getline(cin, A);
	getline(cin, B);
	A.append(B);
	for (int i = 0; i < A.size(); i++)
	{
		if (!isExist[(int)A[i]])
		{
			cout << A[i];
			isExist[(int)A[i]] = true;
		}
	}
	
    return 0;
}


猜你喜欢

转载自blog.csdn.net/DoctorLDQ/article/details/86530797