www.pudn.com > zju_1000_1010.rar > 1004_CUR.CPP


 //accepted 
 
 #include 
 #include 
 
 
 char str1[201],str2[201]; 
 static int len;static int q1,q2; 
 
 int po[400]; int point1,point2; 
 char tac1[200],tac2[200]; 
 
 void doing(int j){ 
 
 
  if(j==2*len){ 
 
 
	for(int q=0;q=len) continue; 
	   po[j]=0;tac1[q1]=str1[point1]; 
 
	   q1++;point1++; 
 
	   doing(j+1); 
	   q1--;point1--;} 
	else{ 
		  if(q1>0) tac2[q2]=tac1[q1-1];else continue; 
 
		  if(tac2[q2]!=str2[point2]) continue; 
		  po[j]=1; 
 
		  q2++;point2++;q1--;char t_ch=tac1[q1]; 
		  doing(j+1); 
		  tac1[q1]=t_ch;q1++;point2--;q2--; 
		} 
	 } } 
 
} 
 
 
int  main(){ 
 
 
 
 
   while(cin>>str1>>str2){ 
   cout<<"["<