結果

問題 No.1021 Children in Classrooms
ユーザー syosinnsya8syosinnsya8
提出日時 2020-04-10 21:52:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 315 bytes
コンパイル時間 155 ms
コンパイル使用メモリ 10,708 KB
実行使用メモリ 8,372 KB
最終ジャッジ日時 2023-10-14 00:23:26
合計ジャッジ時間 11,731 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,032 KB
testcase_01 AC 16 ms
7,816 KB
testcase_02 AC 16 ms
7,776 KB
testcase_03 AC 881 ms
8,336 KB
testcase_04 AC 1,065 ms
8,328 KB
testcase_05 AC 881 ms
8,212 KB
testcase_06 AC 911 ms
8,372 KB
testcase_07 AC 1,673 ms
8,368 KB
testcase_08 AC 1,514 ms
8,308 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()
for i in range(m):
    if s[i]=='L':
        for i in range(n-1):
            a[i]+=a[i+1]
            a[i+1]=0
    else:
        for i in reversed(range(1,n)):
            a[i]+=a[i-1]
            a[i-1]=0

ans=' '.join(map(str,a))
print(ans)
0