結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
12,212 KB
testcase_01 AC 16 ms
7,816 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 59 ms
8,360 KB
testcase_08 AC 57 ms
8,516 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]=='L':   S=S.replace('RL','')
else:           S=S.replace('LR','')
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