竞赛
考级
#include<bits/stdc++.h> using namespace std; int main(){ char a[100]; scanf("%s",a); int la=strlen(a); for(int i=0;i<la;i++){ for(int o=i+1;o<la;o++){ if(a[i]==a[o]){ cout<<"no"; return 0; } } } cout<<"yes"; return 0; }
LS_YZY
亲测过,单词长度不超过5个字母 字符数组解法: 字符串解法:
zsy