Pangram

简介: Pangram

文章目录

一、Pangram

总结


一、Pangram

本题链接:Pangram


题目:

A. Pangram

time limit per test2 seconds

memory limit per test256 megabytes

inputstandard input

outputstandard 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.


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

本博客给出本题截图

image.png

题意:输入一个字符串,判断是否出现了所有字母(不区分大小写)

AC代码

#include <iostream>
#include <string>
#include <set>
using namespace std;
int main()
{
    int n;
    cin >> n;
    if (n < 26)
    {
        puts("NO");
        exit(0);
    }
    else
    {
        string a;
        cin >> a;
        set<char> s;
        for (int i = 0; i < n; i ++ ) 
        {
            if (a[i] >= 'A' && a[i] <= 'Z')
                a[i] = a[i] - 'A' + 'a';
            s.insert(a[i]);
        }
        if (s.size() == 26) puts("YES");
        else puts("NO");
    }
    return 0;
}

总结

水题,不解释


目录
相关文章
|
2月前
|
前端开发 JavaScript 搜索推荐
解密: SPA 与 MPA
单页面应用(SPA)是一种Web应用架构,其中所有的内容和功能都包含在单一的HTML页面中。这种应用在用户与界面交互时不会进行全页刷新,而是通过动态更新页面上的局部内容来提供流畅的用户体验。多页面应用(MPA)是一种传统的Web应用程序架构,它由多个页面组成,每个页面都是一个独立的文档,通常包含自己的一套JavaScript、CSS等资源。当用户在应用中导航时,浏览器会重新加载整个页面和相关的资源。
|
2月前
|
SQL 分布式计算 HIVE
ApacheHudi使用问题汇总(一)
ApacheHudi使用问题汇总(一)
11 0
|
4月前
|
缓存 Java API
深入理解JPA
深入理解JPA
58 0
|
8月前
3.3 Path
3.3 Path
53 0
|
8月前
|
人工智能 供应链
PPA322B HIEE300016R2 HIEE400235R1
PPA322B HIEE300016R2 HIEE400235R1
43 0
PPA322B HIEE300016R2 HIEE400235R1
|
云栖大会
apaas 、ipaas
apaas 、ipaas自制脑图
144 0
apaas 、ipaas
PAT有几个pat
字符串APPAPT中包含了两个单词“PAT”,其中第一个PAT是第2位§,第4位(A),第6位(T);第二个PAT是第3位§,第4位(A),第6位(T)。 现给定字符串,问一共可以形成多少个PAT?
82 0
|
供应链 机器人
什么是RPA?
什么是RPA?
274 0
|
SQL Java 数据库连接
JPA
JPA
119 1