首页 > 学院 > 开发设计 > 正文

CodeForces - 520A

2019-11-06 07:12:44
字体:
来源:转载
供稿:网友

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.

ExampleInput
12toosmallwordOutput
NOInput
35TheQuickBrownFoxJumpsOverTheLazyDogOutput

YES

//// Created by liyuanshuo on 17-3-5.//#include <iostream>#include <cstring>using namespace std;int main4( ){	//freopen("/home/liyuanshuo//ClionProject/C4Practice1/in.in", "r", stdin);	bool ans[26];	int n, sum = 0;	char tmp;	cin>>n;	memset( ans, false, sizeof(ans));	for (int i = 0 ; i <n  ; ++i)	{		cin>>tmp;		if (tmp >= 'A' )			tmp = tolower(tmp);		ans[tmp-'a'] = true;	}		for( int i = 0; i<26 ; i++ )	{		if ( ans[i] )		{			sum++;		}	}	if ( sum == 26 )		cout<<"YES"<<endl;	else		cout<<"NO"<<endl;	return 0;}


上一篇:高精度乘方

下一篇:CodeForces - 333A

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表