結果

問題 No.730 アルファベットパネル
ユーザー kpinkcat
提出日時 2023-08-21 12:42:10
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 393 bytes
コンパイル時間 821 ms
コンパイル使用メモリ 94,524 KB
最終ジャッジ日時 2025-02-16 12:01:36
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
using namespace std;


int main()
{
    string s;
    cin >> s;
    vector<int> a(26);
    for (int i = 0; i < s.size(); i++){
        if(!a[s[i] - 'A']) a[s[i] - 'A']++;
        else if (a[s[i] - 'A']){
            cout << "NO" << endl;
            return 0;
        }
    }
    cout << "YES" << endl;
}
0