Love renaming the small melts 2 (Codevs 3149)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.