提出 #31187819
ソースコード 拡げる
#include <bits/stdc++.h>
using namespace std;
int main() {
bool cap, low, result;
string s;
cin >> s;
int s_len;
s_len = s.length();
set<char> set_s;
cap = false;
low = false;
result = true;
for (char c : s){
if(c >= 'a' && c <= 'z'){
cap = true;
}
if(c >= 'A' && c <= 'Z'){
low = true;
}
if (set_s.count(c)){
result = false;
break;
}
else{
set_s.insert(c);
}
}
cout << ( (result && cap && low) ? "Yes" : "No") << endl;
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | B - Perfect String |
| ユーザ | nullpoint |
| 言語 | C++ (GCC 9.2.1) |
| 得点 | 200 |
| コード長 | 560 Byte |
| 結果 | AC |
| 実行時間 | 8 ms |
| メモリ | 3624 KiB |
コンパイルエラー
./Main.cpp: In function ‘int main()’:
./Main.cpp:7:7: warning: variable ‘s_len’ set but not used [-Wunused-but-set-variable]
7 | int s_len;
| ^~~~~
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 200 / 200 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | example_00.txt, example_01.txt, example_02.txt, example_03.txt |
| All | example_00.txt, example_01.txt, example_02.txt, example_03.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| example_00.txt | AC | 8 ms | 3408 KiB |
| example_01.txt | AC | 2 ms | 3412 KiB |
| example_02.txt | AC | 2 ms | 3584 KiB |
| example_03.txt | AC | 2 ms | 3588 KiB |
| test_00.txt | AC | 3 ms | 3616 KiB |
| test_01.txt | AC | 2 ms | 3428 KiB |
| test_02.txt | AC | 2 ms | 3476 KiB |
| test_03.txt | AC | 2 ms | 3408 KiB |
| test_04.txt | AC | 2 ms | 3544 KiB |
| test_05.txt | AC | 4 ms | 3624 KiB |
| test_06.txt | AC | 3 ms | 3584 KiB |
| test_07.txt | AC | 2 ms | 3564 KiB |
| test_08.txt | AC | 2 ms | 3588 KiB |
| test_09.txt | AC | 2 ms | 3588 KiB |
| test_10.txt | AC | 2 ms | 3488 KiB |
| test_11.txt | AC | 2 ms | 3620 KiB |
| test_12.txt | AC | 5 ms | 3540 KiB |
| test_13.txt | AC | 2 ms | 3484 KiB |