3149 Love renaming the small melts 2
time limit: 2 sspace limit: 128000 KBtitle level: Golden Gold SolvingView Run ResultsTitle Description
Description
There was a man called Wikioi, who liked to change his name.
Now his request has changed, as long as the English letter is his name.
Give you n First name, ask you to judge whether is small melts.
It also reinforces the test data.
Enter a description
Input Description
N
N-row name (all characters)
Output description
Output Description
n rows, yes or no (uppercase)
Sample input
Sample Input
3
&6*14315
Rinkement
Micsloox
Sample output
Sample Output
NO
YES
YES
Data range and Tips
Data Size & Hint
For 40% data n≤10 name length ≤100
For 100% data n≤50 name length ≤100000
#include <cstdio>#include<iostream>#include<cstring>#defineM 100010using namespacestd;CharS[m];intMain () {intN; scanf ("%d",&N); for(intI=1; i<=n;i++) { intflag=0; CIN>>s; intlen=strlen (s); for(intj=0; j<len;j++) if((s[j]>='A'&&s[j]<='Z')|| (s[j]>='a'&&s[j]<='Z')); Else{flag=1; printf ("no\n"); Break; } if(!flag) printf ("yes\n"); } return 0;}
View Code
Love renaming the small melts 2 (Codevs 3149)