結果

問題 No.730 アルファベットパネル
ユーザー LaylaLayla
提出日時 2018-09-29 00:37:51
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 483 bytes
コンパイル時間 647 ms
コンパイル使用メモリ 63,368 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-02 12:24:22
合計ジャッジ時間 1,272 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,384 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;
#define rep(i, s, n) for(int i = s;i<n;i++)

int main(void) {
    string inp;
    bool is_yes;
    cin >> inp;
    sort(inp.begin(), inp.end());
    rep(i, 0, inp.length() - 1) {
        if (inp[i] == inp[i + 1]) {
            is_yes = false;
            break;
        } else {
            is_yes = true;
        }
    }
    if (is_yes) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }
}
0