結果
| 問題 | No.1021 Children in Classrooms |
| コンテスト | |
| ユーザー |
timi
|
| 提出日時 | 2020-10-12 16:54:54 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 223 ms / 2,000 ms |
| + 20µs | |
| コード長 | 333 bytes |
| 記録 | |
| コンパイル時間 | 313 ms |
| コンパイル使用メモリ | 21,284 KB |
| 実行使用メモリ | 34,504 KB |
| 最終ジャッジ日時 | 2026-08-20 08:47:45 |
| 合計ジャッジ時間 | 6,053 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
N,M=map(int, input().split())
A=list(map(int, input().split()))
s=input()
from collections import deque
d=deque(A)
for i in s:
if i=='L':
a=d.popleft()
b=d.popleft()
d.appendleft(a+b)
d.append(0)
else:
a=d.pop()
b=d.pop()
d.appendleft(0)
d.append(a+b)
print(*d)
timi