結果

問題 No.1021 Children in Classrooms
ユーザー 👑 KazunKazun
提出日時 2020-06-10 17:44:43
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 280 bytes
コンパイル時間 715 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 252,744 KB
最終ジャッジ日時 2023-09-05 14:20:04
合計ジャッジ時間 5,170 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
75,804 KB
testcase_01 AC 77 ms
71,112 KB
testcase_02 AC 76 ms
71,296 KB
testcase_03 AC 97 ms
77,584 KB
testcase_04 AC 101 ms
77,592 KB
testcase_05 AC 99 ms
77,644 KB
testcase_06 AC 97 ms
77,324 KB
testcase_07 AC 99 ms
77,592 KB
testcase_08 AC 102 ms
77,588 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())
A=list(map(int,input().split()))
S=input()

m=0
x,y=0,0
for d in S:
    if d=="L":
        a=A.pop(0)
        A[0]+=a
        A.append(0)
    else:
        a=A.pop()
        A[-1]+=a
        A=[0]+A

for i in range(N):
    print(A[i],end=" ")
print()
0