結果
| 問題 |
No.1021 Children in Classrooms
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2020-04-10 21:23:05 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 287 ms / 2,000 ms |
| コード長 | 462 bytes |
| コンパイル時間 | 226 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 29,480 KB |
| 最終ジャッジ日時 | 2024-09-15 16:45:21 |
| 合計ジャッジ時間 | 5,448 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
# coding: utf-8
# Your code here!
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
read = sys.stdin.read
from collections import deque
n,m = [int(i) for i in readline().split()]
a = deque(int(i) for i in readline().split())
s = input()
for i in s:
if i == "L":
x = a[0]
a.popleft()
a.append(0)
a[0] += x
else:
x = a[-1]
a.pop()
a.appendleft(0)
a[-1] += x
print(*a)
convexineq