結果

問題 No.730 アルファベットパネル
ユーザー ooooobaoooooba
提出日時 2021-04-03 20:42:18
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 633 bytes
コンパイル時間 1,050 ms
コンパイル使用メモリ 118,704 KB
最終ジャッジ日時 2025-01-20 10:42:42
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <optional>
#include <queue>
#include <set>
#include <sstream>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

int main() {
    string s;
    cin >> s;
    unordered_map<char, int32_t> hist;
    for (auto c : s) {
        ++hist[c];
    }
    bool ans = true;
    for (auto &&p : hist) {
        if (p.second > 1) {
            ans = false;
            break;
        }
    }
    cout << (ans ? "YES" : "NO") << endl;
    return 0;
}
0