题目传送门:
题解:
#include#include #include #include using namespace std;int main() { string A, B, C; getline(cin, A); getline(cin, B); C = A + B; int *str = new int[200]; for (int i = 0; i < 200; i++) { str[i] = 0; } for (int i = 0; i < C.size(); i++) { if (str[C[i]] == 0) { cout << C[i]; str[C[i]] = 1; } } return 0;}