Home > Back-end >  Why there is a wrong, bosses to help
Why there is a wrong, bosses to help

Time:11-19

# include

Int main ()
{
Char string [1000000], the pattern [1000000].
int n;
The scanf (" % s ", string);
scanf("%d",&n);
for(int i=0; i{
Int m=0, n=0, the index=0, flag=0, flag_1=0;
The scanf (" % s ", the pattern);
While (string [m].='\ 0')
{
If (string [m]==pattern [0])
{
For (int k=m + 1, n=1;; K++ n++)
{
If (string [k]=='\ 0' && pattern [n].='\ 0')
{
flag=1;
break;
}
If (the pattern [n]=='\ 0')
{
Flag_1=1;
break;
}
If (string [k]==pattern [n])
The index=k;
The else
break;
}
}
m++;
If (flag | | flag_1)
break;
}
If (flag_1)
{
Printf (" % s ", the pattern);
Printf (" % s ", string + (index + 1));
printf("\n");
}
The else
Printf (" Not Found \ n ");
}
return 0;
}
  • Related