【题目链接】:http://codeforces.com/problemset/problem/520/A

【题意】

给你一个字符串.
统计里面有没有出现所有的英文字母->’a’..’z’
每个字母大小写都接受

【题解】

用map写就好;
看看’A’或’a’以及’B’或’b’…有没有出现;
同时没出现的话就返回false;

【完整代码】

#include <bits/stdc++.h>
using namespace std;
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define LL long long
#define rep1(i,a,b) for (int i = a;i <= b;i++)
#define rep2(i,a,b) for (int i = a;i >= b;i--)
#define mp make_pair
#define ps push_back
#define fi first
#define se second
#define rei(x) scanf("%d",&x)
#define rel(x) scanf("%lld",&x)
#define ref(x) scanf("%lf",&x)typedef pair<int, int> pii;
typedef pair<LL, LL> pll;const int dx[9] = { 0,1,-1,0,0,-1,-1,1,1 };
const int dy[9] = { 0,0,0,-1,1,-1,1,-1,1 };
const double pi = acos(-1.0);
const int N = 110;map <char, int> dic;
int n;
char s[N];int main()
{//freopen("F:\\rush.txt", "r", stdin);rei(n);scanf("%s", s + 1);rep1(i, 1, n)dic[s[i]] = 1;for (char a = 'a', A = 'A'; a <= 'z'&&A <= 'Z'; a++, A++)if (dic[a] | dic[A])continue;elsereturn puts("NO"), 0;puts("YES");//printf("\n%.2lf sec \n", (double)clock() / CLOCKS_PER_SEC);return 0;
}

转载于:https://www.cnblogs.com/AWCXV/p/7626485.html

【codeforces 520A】Pangram相关推荐

  1. 【CodeForces - 144C】Anagram Search(尺取,滑窗问题,处理字符串计数)

    题干: A string t is called an anagram of the string s, if it is possible to rearrange letters in t so ...

  2. 【CodeForces - 574B】Bear and Three Musketeers (枚举边,思维,优秀暴力)

    题干: Do you know a story about the three musketeers? Anyway, you will learn about its origins now. Ri ...

  3. 【CodeForces - 608C】Chain Reaction (二分 或 dp ,思维)

    题干: 题目大意: 题意是在一条直线上坐落着不同位置的灯塔,每一个灯塔有自己的power level,当作是射程范围.现在从最右边的灯塔开始激发,如果左边的灯塔在这个灯塔的范围之内,那么将会被毁灭.否 ...

  4. 「一题多解」【CodeForces 85D】Sum of Medians(线段树 / 分块)

    题目链接 [CodeForces 85D]Sum of Medians 题目大意 实现一个setsetset,支持插入,删除,求∑a5k+3∑a5k+3\sum a_{5k+3}.注意,setsets ...

  5. 【CodeForces 997C】Sky Full of Stars(组合计数)

    题目链接:[CodeForces 997C]Sky Full of Stars 官方题解:Codeforces Round #493 - Editorial 题目大意:有一个n×nn×nn\times ...

  6. 【codeforces 812C】Sagheer and Nubian Market

    [题目链接]:http://codeforces.com/contest/812/problem/C [题意] 给你n个物品; 你可以选购k个物品;则 每个物品有一个基础价值; 然后还有一个附加价值; ...

  7. 【codeforces 508B】Anton and currency you all know

    [题目链接]:http://codeforces.com/contest/508/problem/B [题意] 给你一个奇数; 让你交换一次数字; 使得这个数字变成偶数; 要求偶数要最大; [题解] ...

  8. 【codeforces 711B】Chris and Magic Square

    [题目链接]:http://codeforces.com/contest/711/problem/B [题意] 让你在矩阵中一个空白的地方填上一个正数; 使得这个矩阵两个对角线上的和; 每一行的和,每 ...

  9. 【codeforces 807C】Success Rate

    [题目链接]:http://codeforces.com/contest/807/problem/C [题意] 给你4个数字 x y p q 要求让你求最小的非负整数b; 使得 (x+a)/(y+b) ...

最新文章

  1. Windows 7 Natvie VHD
  2. c++读取txt中每行的数据到数组中
  3. VS2015中配置MSComm通讯控件和注意事项
  4. android 字体描边实现,android文字描边功能的实现
  5. MaxCompute 费用暴涨之新增SQL分区裁剪失败
  6. python猜词游戏源代码_Python趣味小游戏编写教学
  7. 人从众!中秋小长假全国铁路预计发送旅客4600万人次
  8. 在网页中嵌入任意字体(特殊字体/自定义字体)的解决方案
  9. 计算机系统-电路设计10-寄存器的内部电路实现(输入与输出不同线)
  10. 【数据挖掘】基于密度的聚类方法 - OPTICS 方法 ( 算法流程 | 算法示例 )
  11. 使用ACR122U和Proxmark3复制IC卡
  12. 关于连接PostgreSQL时提示 FATAL: password authentication failed for user 连接用户名 的解决方法...
  13. 到底要不要去外包公司?这篇带你全面了解外包那些坑!
  14. Base-calling for next-generation sequencing platforms (译文)
  15. 服务器无线桥接技巧,服务器无线桥接设置方法
  16. Block.one的EOS区块链入门开发教程Elemental Battles
  17. UNITY与Mac⭐一、在苹果电脑上配置 Unity 安卓环境的教程
  18. 论文《Avoiding Inference Heuristics in Few-shot Prompt-based Finetuning》学习笔记
  19. 百度地图的鹰眼服务--Web上手
  20. 服务器和交换机物理连接_利用Calico融合物理网络的云原生容器SDN方案

热门文章

  1. java concurrency 读书笔记
  2. 请问软件设计师证在找工作中有多大用呢?
  3. 51单片机迷宫小车的设计
  4. 【未来有约】清华学霸、沙县舞王…竟还是突破RPA天花板的人?
  5. android wifi wps 流程,android中WiFi wps连接方式
  6. 如何使用uTorrent制作自己的种子
  7. 如何打开 plist 文件
  8. 基于小梅哥AC620开发板的NIOS II LWIP百兆以太网例程移植到自己做的板子上
  9. flowable 监听器
  10. 互联网大会蓝皮书_世界互联网大会蓝皮书