Submission #387609


Source Code Expand

N = int(input())
s = input()
bottuns = ["A", "B", "X", "Y"]
combos = []

for b1 in bottuns:
    for b2 in bottuns:
        combos.append(b1 + b2)

minnum = 1001
for b1 in combos:
    for b2 in combos:
        if b1 == b2:
            continue
        t = s.replace(b1, "R").replace(b2, "L")
        minnum = min(len(t), minnum)
print(minnum)

Submission Info

Submission Time
Task C - コマンド入力
User yumechi
Language Python (3.2.3)
Score 100
Code Size 357 Byte
Status AC
Exec Time 236 ms
Memory 9048 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 45
Set Name Test Cases
All 00_retmax.txt, 00_retmin.txt, 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_rnd_00.txt, 01_rnd_01.txt, 01_rnd_02.txt, 01_rnd_03.txt, 01_rnd_04.txt, 01_rnd_05.txt, 01_rnd_06.txt, 01_rnd_07.txt, 01_rnd_08.txt, 01_rnd_09.txt, 01_rnd_10.txt, 01_rnd_11.txt, 01_rnd_12.txt, 01_rnd_13.txt, 01_rnd_14.txt, 01_rnd_15.txt, 01_rnd_16.txt, 01_rnd_17.txt, 01_rnd_18.txt, 01_rnd_19.txt, 02_twothree_00.txt, 02_twothree_01.txt, 02_twothree_02.txt, 02_twothree_03.txt, 02_twothree_04.txt, 02_twothree_05.txt, 02_twothree_06.txt, 02_twothree_07.txt, 02_twothree_08.txt, 02_twothree_09.txt, 02_twothree_10.txt, 02_twothree_11.txt, 02_twothree_12.txt, 02_twothree_13.txt, 02_twothree_14.txt, 02_twothree_15.txt, 02_twothree_16.txt, 02_twothree_17.txt, 02_twothree_18.txt, 02_twothree_19.txt
Case Name Status Exec Time Memory
00_retmax.txt AC 236 ms 8940 KB
00_retmin.txt AC 130 ms 8952 KB
00_sample_00.txt AC 132 ms 8944 KB
00_sample_01.txt AC 133 ms 8948 KB
00_sample_02.txt AC 137 ms 8932 KB
01_rnd_00.txt AC 142 ms 8944 KB
01_rnd_01.txt AC 140 ms 8952 KB
01_rnd_02.txt AC 139 ms 8944 KB
01_rnd_03.txt AC 140 ms 8940 KB
01_rnd_04.txt AC 141 ms 9044 KB
01_rnd_05.txt AC 138 ms 8924 KB
01_rnd_06.txt AC 142 ms 9040 KB
01_rnd_07.txt AC 141 ms 8952 KB
01_rnd_08.txt AC 143 ms 8948 KB
01_rnd_09.txt AC 139 ms 8944 KB
01_rnd_10.txt AC 141 ms 8948 KB
01_rnd_11.txt AC 138 ms 8948 KB
01_rnd_12.txt AC 139 ms 8948 KB
01_rnd_13.txt AC 141 ms 8940 KB
01_rnd_14.txt AC 143 ms 9024 KB
01_rnd_15.txt AC 140 ms 8948 KB
01_rnd_16.txt AC 140 ms 8888 KB
01_rnd_17.txt AC 138 ms 8944 KB
01_rnd_18.txt AC 139 ms 8948 KB
01_rnd_19.txt AC 138 ms 8944 KB
02_twothree_00.txt AC 134 ms 8924 KB
02_twothree_01.txt AC 136 ms 8948 KB
02_twothree_02.txt AC 135 ms 8940 KB
02_twothree_03.txt AC 136 ms 8940 KB
02_twothree_04.txt AC 142 ms 8872 KB
02_twothree_05.txt AC 136 ms 8948 KB
02_twothree_06.txt AC 134 ms 8948 KB
02_twothree_07.txt AC 138 ms 9048 KB
02_twothree_08.txt AC 138 ms 8948 KB
02_twothree_09.txt AC 135 ms 8944 KB
02_twothree_10.txt AC 139 ms 9020 KB
02_twothree_11.txt AC 138 ms 8900 KB
02_twothree_12.txt AC 142 ms 8944 KB
02_twothree_13.txt AC 138 ms 8948 KB
02_twothree_14.txt AC 133 ms 8944 KB
02_twothree_15.txt AC 135 ms 8944 KB
02_twothree_16.txt AC 136 ms 8932 KB
02_twothree_17.txt AC 138 ms 8948 KB
02_twothree_18.txt AC 136 ms 8888 KB
02_twothree_19.txt AC 136 ms 8944 KB