Submission #40401849
Source Code Expand
N = int(input())
S = input()
if N == 1:
print("Yes")
else:
print(
"Yes"
if
len(set(S[0::2])) == 1 and
len(set(S[1::2])) == 1 and
len(set(S[:2])) == 2
else
"No"
)
Submission Info
| Submission Time | |
|---|---|
| Task | A - Alternately |
| User | arakaki_tokyo |
| Language | PyPy3 (7.3.0) |
| Score | 100 |
| Code Size | 217 Byte |
| Status | AC |
| Exec Time | 69 ms |
| Memory | 61412 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, sample_01.txt, sample_02.txt, sample_03.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| random_01.txt | AC | 69 ms | 61308 KiB |
| random_02.txt | AC | 51 ms | 61412 KiB |
| random_03.txt | AC | 50 ms | 61172 KiB |
| random_04.txt | AC | 49 ms | 61180 KiB |
| random_05.txt | AC | 45 ms | 61392 KiB |
| random_06.txt | AC | 43 ms | 61396 KiB |
| random_07.txt | AC | 51 ms | 61140 KiB |
| random_08.txt | AC | 53 ms | 61268 KiB |
| sample_01.txt | AC | 48 ms | 61368 KiB |
| sample_02.txt | AC | 49 ms | 61184 KiB |
| sample_03.txt | AC | 51 ms | 61168 KiB |