結果
問題 | No.1021 Children in Classrooms |
ユーザー |
|
提出日時 | 2020-06-10 09:21:02 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 264 ms / 2,000 ms |
コード長 | 252 bytes |
コンパイル時間 | 603 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 30,584 KB |
最終ジャッジ日時 | 2024-06-13 03:28:03 |
合計ジャッジ時間 | 4,908 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
#yuki1021from collections import dequen,m=map(int,input().split())a=list(map(int,input().split()))s=input()q=deque(a)for c in s:if c=='L':x=q.popleft()q[0]+=xq.append(0)elif c=='R':x=q.pop()q[-1]+=xq.appendleft(0)print(*q)