- الكود:
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
- الكود:
int main () {int finish=0,n,t=0,o=0,S=0,SS=0,f=0,sr;
int x,y=1,z,m,q,s,h,k,c=0,a,b,d,LARGE,g=1,e,rr;//a,b,c,d,t,i,j,e,g,rr
string yy,uu;char ar[24],arr[24],tt;
cin>>n;
for (int i=0;i<n;i++)
{
cin>>yy>>uu;o=0;
for (int i=0;i<uu.size();i++)
{
for (int j=0;j<yy.size();j++,o=0)
{
if (yy[j]==uu[i])
{for (int f=j;o<uu.size();f++){//cout<<yy[f]<<uu[i]<<endl;
if ((yy[f]!=uu[i])&&(t==0))
{if (uu[i+1]==yy[f])
{i++;t++;continue; }
else if ((o+1==uu.size()))
{sr=o;break;}
else
break;
}
- الكود:
o++;i++;}
if (sr>o)
o=sr;
- الكود:
}
}
cout<<o<<i;
}
if (o==uu.size()){cout<<"good"<<endl;SS++;o=0;t=0;i=0;break;}
else if ((o+1)==uu.size()){cout<<"almost good"<<endl;SS++;o=0;t=0;i=0;break;}
if (SS!=1) cout<<"none"<<endl;SS=0;o=0;o=0;t=0;i=0;
- الكود:
}
- الكود:
return 0;
}