Submission #40457157
Source Code Expand
S = input()
B = []
flag = 0
K = False
for i in range(len(S)):
if S[i]=="B":
B.append(i+1)
if S[i]=="R" and flag == 0:
flag=1
elif S[i]=="R" and flag == 1:
flag = 0
if S[i]=="K" and flag==1:
K = True
if B[0]%2 != B[1]%2:
B = True
else:
B = False
if B and K:
print("Yes")
else:
print("No")
Submission Info
| Submission Time | |
|---|---|
| Task | B - chess960 |
| User | KumaNeko08 |
| Language | PyPy3 (7.3.0) |
| Score | 200 |
| Code Size | 377 Byte |
| Status | AC |
| Exec Time | 62 ms |
| Memory | 61684 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt |
| All | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_01.txt | AC | 62 ms | 61684 KiB |
| 00_sample_02.txt | AC | 51 ms | 61500 KiB |
| 00_sample_03.txt | AC | 52 ms | 61668 KiB |
| 01_test_01.txt | AC | 53 ms | 61408 KiB |
| 01_test_02.txt | AC | 51 ms | 61672 KiB |
| 01_test_03.txt | AC | 49 ms | 61612 KiB |
| 01_test_04.txt | AC | 48 ms | 61612 KiB |
| 01_test_05.txt | AC | 46 ms | 61464 KiB |
| 01_test_06.txt | AC | 48 ms | 61552 KiB |
| 01_test_07.txt | AC | 49 ms | 61536 KiB |
| 01_test_08.txt | AC | 45 ms | 61368 KiB |
| 01_test_09.txt | AC | 50 ms | 61600 KiB |
| 01_test_10.txt | AC | 50 ms | 61532 KiB |