Submission #31177590
Source Code Expand
#include<iostream> #include<string> #include<vector> #include<stack> #include<queue> #include<set> #include<map> #include<algorithm> #include<cstring> using namespace std; int main() { string str; int i, j; bool a, b; cin >> str; a = false; b = false; for (i = 0; i < str.length(); i++) { if (str[i] >= 'A' && str[i] <= 'Z') a = true; if (str[i] >= 'a' && str[i] <= 'z') b = true; for (j = i + 1; j < str.length(); j++) { if (str[i] == str[j]) { cout << "No"; return 0; } } } if (a && b) cout << "Yes"; else cout << "No"; }
Submission Info
Submission Time | |
---|---|
Task | B - Perfect String |
User | gojib2002 |
Language | C++ (GCC 9.2.1) |
Score | 200 |
Code Size | 602 Byte |
Status | AC |
Exec Time | 8 ms |
Memory | 3620 KiB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:22:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 22 | for (i = 0; i < str.length(); i++) | ~~^~~~~~~~~~~~~~ ./Main.cpp:26:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 26 | for (j = i + 1; j < str.length(); j++) | ~~^~~~~~~~~~~~~~
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
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 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
example_00.txt | AC | 8 ms | 3600 KiB |
example_01.txt | AC | 2 ms | 3492 KiB |
example_02.txt | AC | 2 ms | 3480 KiB |
example_03.txt | AC | 2 ms | 3480 KiB |
test_00.txt | AC | 2 ms | 3576 KiB |
test_01.txt | AC | 2 ms | 3568 KiB |
test_02.txt | AC | 2 ms | 3528 KiB |
test_03.txt | AC | 2 ms | 3476 KiB |
test_04.txt | AC | 1 ms | 3472 KiB |
test_05.txt | AC | 2 ms | 3576 KiB |
test_06.txt | AC | 2 ms | 3576 KiB |
test_07.txt | AC | 5 ms | 3620 KiB |
test_08.txt | AC | 2 ms | 3576 KiB |
test_09.txt | AC | 1 ms | 3576 KiB |
test_10.txt | AC | 2 ms | 3552 KiB |
test_11.txt | AC | 2 ms | 3528 KiB |
test_12.txt | AC | 2 ms | 3480 KiB |
test_13.txt | AC | 2 ms | 3484 KiB |