結果

問題 No.1000 Point Add and Array Add
ユーザー brthyyjp
提出日時 2020-02-28 22:42:24
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 383 bytes
コンパイル時間 412 ms
コンパイル使用メモリ 82,392 KB
実行使用メモリ 104,180 KB
最終ジャッジ日時 2024-10-13 18:33:39
合計ジャッジ時間 3,442 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 2
other RE * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

n, q = map(int, input().split())
A = list(map(int, input().split()))

import numpy as np
A = np.array(A)
B = np.zeros(n, dtype = 'int64')

for _ in range(q):
    c, x, y = map(str, input().split())
    x = int(x)
    y = int(y)
    if c == 'A':
        x -= 1
        A[x] += y
    else:
        x, y = x-1, y-1
        B[x:y+1] += A[x:y+1]
#print(A)
#print(B)
B = list(B)
print(*B)
0