Codeforces Round #295 (Div. 2)A - Pangram 水题
2 seconds
256 megabytes
standard input
standard output
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.
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 "YES", if the string is a pangram and "NO" otherwise.
12
toosmallword
NO
35
TheQuickBrownFoxJumpsOverTheLazyDog
YES 题意:问你26个英文字母是否用完
题解:用一个flag记录一下就好
int flag[];
string s;
int main()
{
cin>>s;
cin>>s;
REP(i,s.size())
{
if('a'<=s[i]&&s[i]<='z')
flag[s[i]-'a']=;
else
flag[s[i]-'A']=;
}
REP(i,)
{
if(flag[i]==)
{
cout<<"NO"<<endl;
return ;
}
}
cout<<"YES"<<endl;
}
Codeforces Round #295 (Div. 2)A - Pangram 水题的更多相关文章
- Codeforces Round #185 (Div. 2) B. Archer 水题
B. Archer Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/312/problem/B D ...
- Codeforces Round #360 (Div. 2) A. Opponents 水题
A. Opponents 题目连接: http://www.codeforces.com/contest/688/problem/A Description Arya has n opponents ...
- Codeforces Round #190 (Div. 2) 水果俩水题
后天考试,今天做题,我真佩服自己... 这次又只A俩水题... orz各路神犇... 话说这次模拟题挺多... 半个多小时把前面俩水题做完,然后卡C,和往常一样,题目看懂做不出来... A: 算是模拟 ...
- Codeforces Round #256 (Div. 2/A)/Codeforces448A_Rewards(水题)解题报告
对于这道水题本人觉得应该应用贪心算法来解这道题: 下面就贴出本人的代码吧: #include<cstdio> #include<iostream> using namespac ...
- Codeforces Round #340 (Div. 2) B. Chocolate 水题
B. Chocolate 题目连接: http://www.codeforces.com/contest/617/problem/D Descriptionww.co Bob loves everyt ...
- Codeforces Round #340 (Div. 2) A. Elephant 水题
A. Elephant 题目连接: http://www.codeforces.com/contest/617/problem/A Descriptionww.co An elephant decid ...
- Codeforces Round #340 (Div. 2) D. Polyline 水题
D. Polyline 题目连接: http://www.codeforces.com/contest/617/problem/D Descriptionww.co There are three p ...
- Codeforces Round #338 (Div. 2) A. Bulbs 水题
A. Bulbs 题目连接: http://www.codeforces.com/contest/615/problem/A Description Vasya wants to turn on Ch ...
- Codeforces Round #282 (Div. 1) A. Treasure 水题
A. Treasure Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/494/problem/A ...
随机推荐
- Python Challenge 第 2 关攻略:ocr
text="那一大推乱码" 方案1 from collections import Counter print(Counter(text)) 方案2 import string & ...
- pom可以过滤resource 下的文件
- Small Private Cloud Deployment Solution
项目背景 为用户提供可访问的桌面虚拟机,方便软件研发人员日常办公,软件开发,编译等工作.主要操作包括Visor制图.程序开发测试以及使用office软件办公. 目前阶段需要支持100台虚拟机(4VCP ...
- Logback的继承体系
今天碰到一个问题,发现控制台日志输出两遍,搜索得知,这个是由于logback继承体系导致的. logback不仅会继承level,也会继承appender,需要注意的是: <root> & ...
- @RequestParam,@PathParam,@PathVariable,@QueryParam注解的使用区别
获取url模板上数据的(/{id})@DefaultValue 获取请求参数的(包括post表单提交)键值对(?param1=10¶m2=20).可以设置defaultValue JA ...
- handlermethodargumentresolver
http://www.cnblogs.com/fangjian0423/p/springMVC-request-param-analysis.html http://www.cnblogs.com/f ...
- IOS使用xcode编译代码
一.安装xcode 在app store中搜索xcode然后点击安装即可. 二.创建第一个app 1.启动xcode,单击Lauchpad 2.单击xcode启动 3.单击“Create a new ...
- Oracle 函数 “自动生成订单号”
create or replace function get_request_code return varchar2 AS --函数的作用:自动生成订单号 v_mca_no mcode_apply_ ...
- AdvStringGrid 点击标题头 自动排序
- Codeforces 2B The least round way(dp求最小末尾0)
题目链接:http://codeforces.com/problemset/problem/2/B 题目大意: 给你一个nxn的矩形,找到一条从左上角到右下角的路径,使得该路径上所有数字的乘积的末尾0 ...