結果
| 問題 |
No.730 アルファベットパネル
|
| コンテスト | |
| ユーザー |
koukonko
|
| 提出日時 | 2018-09-12 15:03:11 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 645 bytes |
| コンパイル時間 | 787 ms |
| コンパイル使用メモリ | 82,140 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-26 22:53:32 |
| 合計ジャッジ時間 | 1,327 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 |
ソースコード
#include <iostream>
#include <math.h>
#include <string>
#include <algorithm>
#include <sstream>
#include <iomanip>
#include <stack>
#include <queue>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define MIN(x, y) (x < y ? x : y)
#define MAX(x, y) (x > y ? x : y)
int alphabet[27];
char ch[10];
bool flag = true;
int main(){
cin >> ch;
for(int i = 0; i < 10; ++i){
if(ch[i] >= 'A' && ch[i] <= 'Z'){
alphabet[ch[i] - 'A']++;
if(alphabet[ch[i] - 'A'] >= 2){
flag = false;
}
} else {
if(ch[i] != '\0') flag = false;
}
}
if(flag){
cout << "YES" << endl;
} else{
cout << "NO" << endl;
}
}
koukonko