結果
問題 |
No.1021 Children in Classrooms
|
ユーザー |
![]() |
提出日時 | 2020-05-13 01:09:46 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 283 ms / 2,000 ms |
コード長 | 333 bytes |
コンパイル時間 | 231 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 30,728 KB |
最終ジャッジ日時 | 2024-09-14 04:47:40 |
合計ジャッジ時間 | 4,801 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
n,m=map(int,input().split()) a=[int(j) for j in input().split()] s=input() from collections import deque l=deque(a) for i in s: if i=="L": p=l.popleft() p+=l.popleft() l.appendleft(p) l.append(0) else: p=l.pop() p+=l.pop() l.append(p) l.appendleft(0) print(*l)