Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- char s[101],aux[101],aux1[300],v[101][101],*p,sep[]=",?. ";
- int l1,n,poz,l,i,j,nr,aux2,nrcuv,ap[100];
- int main()
- {cin.getline(s,101);
- p=strtok(s,sep);
- n=0;
- while(p)
- {
- ++n;
- strcpy(v[n],p);
- p=strtok(NULL,sep);
- }
- nr=0;
- for(i=1;i<=n;++i)
- if(strlen(v[i])%2)
- { for(j=1;j<=n;++j)
- {strcpy(aux,v[j]);
- l=strlen(v[j]);
- strcpy(aux+l/2,aux+l/2+1);
- if(strcmp(v[i],aux)==0)
- ++nr;
- }
- }
- if(nr!=0)
- cout<<"DA";
- else
- cout<<"NU";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement