結果
問題 | No.1021 Children in Classrooms |
ユーザー |
![]() |
提出日時 | 2020-06-06 15:20:48 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 262 ms / 2,000 ms |
コード長 | 408 bytes |
コンパイル時間 | 269 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 30,332 KB |
最終ジャッジ日時 | 2024-12-23 12:49:18 |
合計ジャッジ時間 | 4,879 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
from collections import dequen,m=map(int,input().split())a=list(map(int,input().split()))a=deque(a)S=input()for s in S:if s=="L":first=a.popleft()second=a.popleft()after=first+seconda.appendleft(after)a.append(0)else:first=a.pop()second=a.pop()after=first+seconda.append(after)a.appendleft(0)print(*a)