結果

問題 No.730 アルファベットパネル
ユーザー kakakakanekokakakakaneko
提出日時 2018-09-07 21:58:46
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 746 bytes
コンパイル時間 1,767 ms
コンパイル使用メモリ 163,556 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-19 18:35:15
合計ジャッジ時間 2,427 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include "bits/stdc++.h"

using namespace std;
using ll = long long;
using ull = unsigned long long;

typedef pair< long long, long long > P;
typedef pair< long long, P > PP;
typedef pair< P, P > PPP;

const long long MOD = 1e9 + 7;
const  long long  INF = 5e18;
const double DINF = 5e14;
const double eps = 1e-10;
const int di[4] = { 1,0,-1,0 }, dj[4] = { 0,1,0,-1 };

#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
#define pb push_back
#define eb emplace_back
#define fr first
#define sc second

string s;
int cnt[30];

int main() {
	cin >> s;
	for (int i = 0;i < s.size();i++) {
		if (cnt[s[i] - 'A'] == 1) {
			cout << "NO" << endl;
			return 0;
		}
		cnt[s[i] - 'A']++;
	}
	cout << "YES" << endl;
	return 0;
}

0