不解释。。。
#include <stdio.h>
#include <string.h>
int main()
{
int k1, k2, k3, k, i, a, b,x = 0;
char s[999],s0[999];
scanf("%s %s",s, s0);
k = strlen(s);
k3 = strlen(s0);
for(i = 0; i < k; i++)
{
if(s[i]=='|')
{
k1=i;
k2=k-k1-1;
break;
}
}
for(a = 0; a <= k3; a++)
{
if(k1+a==k2+k3-a)
{
x = 1;
break;
}
}
if(x==0)
printf("Impossible\n");
else
{
for(i = 0; i < k1; i++)
printf("%c",s[i]);
for(i = 0; i < a; i++)
printf("%c",s0[i]);
for(i = k1; i < k; i++)
printf("%c",s[i]);
for(i = a; i < k3; i++)
printf("%c",s0[i]);
}
return 0;
}