30 lines
489 B
C
30 lines
489 B
C
#include <stdio.h>
|
|
|
|
int main(){
|
|
int cnt=0, flag, n;
|
|
scanf("%d",&n);
|
|
|
|
char s[101];
|
|
while(n--){
|
|
int chk[26] = {0,};
|
|
flag=0;
|
|
scanf("%s",s);
|
|
for(int i=0; s[i]!='\0'; i++){
|
|
if(chk[s[i]-'a']){
|
|
flag=1;
|
|
break;
|
|
}
|
|
if(s[i]!=s[i+1]){
|
|
chk[s[i]-'a']=1;
|
|
}
|
|
}
|
|
if(!flag){
|
|
cnt++;
|
|
}
|
|
}
|
|
|
|
printf("%d",cnt);
|
|
|
|
return 0;
|
|
|
|
} |