CodeForces 520A

A word or a sentence in some language is called a pangram if all the characters of the alphabet of this language appear in it at least once. Pangrams are often used to demonstrate fonts in printing or test the output devices.

You are given a string consisting of lowercase and uppercase Latin letters. Check whether this string is a pangram. We say that the string contains a letter of the Latin alphabet if this letter occurs in the string in uppercase or lowercase.


Input

The first line contains a single integer n (1 ≤ n ≤ 100) — the number of characters in the string.

The second line contains the string. The string consists only of uppercase and lowercase Latin letters.

Output

Output "YES", if the string is a pangram and "NO" otherwise.

Examples
Input
12
toosmallword
Output
NO
Input
35
TheQuickBrownFoxJumpsOverTheLazyDog
Output
YES


只需要找到26个字母齐全,不论大小写


#include<bits/stdc++.h>
using namespace std;
#define INF 0x3f3f3f3f;	

int main(){
	int n;
	while(~scanf("%d",&n)){
		char a[101];
		getchar();
		gets(a);
		int mark[27];
		for(int i=0;i<=26;i++){
			mark[i]=0;
		}
		for(int i=0;i<strlen(a);i++){
			int d;
			if(a[i]>='a' && a[i]<='z'){
				d=a[i]-'a'+1;
				mark[d]=1;
			}
			else{
				d=a[i]-'A'+1;
				mark[d]=1;
			}
		}
		int p=1;
		for(int i=1;i<=26;i++){
			if(mark[i]==0){
				p=0;
				break;
			}
		}
		if(p==1){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	
} 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值