結果

問題 No.1021 Children in Classrooms
ユーザー _matumo__matumo_
提出日時 2020-09-24 16:37:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 277 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 10,584 KB
実行使用メモリ 36,432 KB
最終ジャッジ日時 2023-09-10 13:30:45
合計ジャッジ時間 4,314 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,304 KB
testcase_01 AC 15 ms
7,848 KB
testcase_02 AC 15 ms
7,792 KB
testcase_03 AC 34 ms
8,312 KB
testcase_04 AC 38 ms
8,436 KB
testcase_05 AC 36 ms
8,312 KB
testcase_06 AC 36 ms
8,228 KB
testcase_07 AC 61 ms
8,540 KB
testcase_08 AC 60 ms
8,548 KB
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
p=list(map(int,input().split()))
S=input()
if S[0]=='LRL':   S=S.replace('L','')
if S[0]=='RLR':   S=S.replace('R','')
for C in S:
    if C=='L':
        p[1]+=p[0]
        p=p[1:]+[0]
    else:
        p[-2]+=p[-1]
        p=[0]+p[0:N-1]
print(*p)
0