#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main()
{
int t;
cin>>t;
char s1[300][100],s2[300][100];
while(t--)
{
int n;
cin>>n;
getchar();
char str[30];
for(int i=0; i<n; i++)
gets(s1[i]);
for(int i=0; i<n; i++)
gets(s2[i]);
int j,i;
for(i=n-1,j=n-1; i>=0; i--)
if(strcmp(s1[i],s2[j])==0)
j--;
for(i=j; i>=0; i--)
puts(s2[i]);
cout<<endl;
}
return 0;
}
uva 10152 ShellSort
最新推荐文章于 2019-02-23 14:47:39 发布