Submission #26890290
Source Code Expand
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <deque>
#include <algorithm>
#include <math.h>
#include <climits>
typedef long long LL;
using namespace std;
int main()
{
string S;
cin >> S;
map<char, int> chars;
for (LL i = 0; i < S.size(); ++i)
{
chars[S[i]]++;
}
if (chars.size() == 3)
{
cout << 6 << endl;
}
else if (chars.size() == 2)
{
cout << 3 << endl;
}
else
{
cout << 1 << endl;
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Distinct Strings |
| User | wfalps |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 568 Byte |
| Status | AC |
| Exec Time | 3 ms |
| Memory | 3632 KiB |
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:18:22: warning: comparison of integer expressions of different signedness: ‘LL’ {aka ‘long long int’} and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
18 | for (LL i = 0; i < S.size(); ++i)
| ~~^~~~~~~~~~
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt, example2.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, example0.txt, example1.txt, example2.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 1 ms | 3628 KiB |
| 001.txt | AC | 3 ms | 3544 KiB |
| 002.txt | AC | 2 ms | 3576 KiB |
| 003.txt | AC | 2 ms | 3528 KiB |
| 004.txt | AC | 2 ms | 3604 KiB |
| 005.txt | AC | 2 ms | 3500 KiB |
| 006.txt | AC | 2 ms | 3524 KiB |
| example0.txt | AC | 2 ms | 3556 KiB |
| example1.txt | AC | 2 ms | 3632 KiB |
| example2.txt | AC | 2 ms | 3608 KiB |