码迷,mamicode.com
首页 > 其他好文 > 详细

520A

时间:2019-07-27 09:24:55      阅读:111      评论:0      收藏:0      [点我收藏+]

标签:printf   lin   char   ems   put   can   highlight   else   str   

#include <stdio.h>
#include <string.h>
#include <stdbool.h>
 
int main()
{
	int n;
	scanf("%d", &n);
	char line[120];
	scanf("%s", line);
	int alp[30];
	int Count=0;
	memset(alp, 0, sizeof(alp));
	bool Put=true;
	if(n<26)
	{
		printf("NO\n");
		Put=false;
	}
	else
	{
		int i;
		for(i=0; i<n; ++i)
		{
			if((line[i]>=65)&&(line[i]<=90))
			{
				if(alp[line[i]-65]==0)
				{
					++Count;
					alp[line[i]-65]=1;
				}
			}
			else
			{
				if(alp[line[i]-97]==0)
				{
					++Count;
					alp[line[i]-97]=1;
				}
			}
		}
	}
	if(Count==26)
		printf("YES\n");
	else
	{
		if(Put)
			printf("NO\n");
	}
	return 0;
}

  

520A

标签:printf   lin   char   ems   put   can   highlight   else   str   

原文地址:https://www.cnblogs.com/ozxics/p/11253778.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!