結果
| 問題 |
No.730 アルファベットパネル
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-09-07 21:58:46 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 746 bytes |
| コンパイル時間 | 1,536 ms |
| コンパイル使用メモリ | 165,860 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-29 13:20:12 |
| 合計ジャッジ時間 | 2,077 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 |
ソースコード
#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;
}