Codevs 3165 Love renaming the small melts 2

Source: Internet
Author: User

3149 Love renaming the small melts 2

http://codevs.cn/problem/3149/

Title 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 <iostream>#include<cstdio>#include<cstring>using namespacestd;intN;Chara[100001];intMain () {scanf ("%d",&N);  for(intI=1; i<=n;i++) {cin>>A; intlen=strlen (a); BOOLok=true;  for(intj=0; j<len;j++)        {            if(! ((a[j]>='a'&&a[j]<='Z')|| (a[j]>='A'&&a[j]<='Z')) {printf ("no\n"); OK=false;  Break; }        }        if(OK) printf ("yes\n"); }}

Codevs 3165 Love renaming the small melts 2

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.