結果

問題 No.1000 Point Add and Array Add
ユーザー mnrmnr
提出日時 2020-02-28 23:19:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 404 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 55,416 KB
最終ジャッジ日時 2024-04-21 20:47:17
合計ジャッジ時間 8,994 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 WA -
testcase_06 RE -
testcase_07 WA -
testcase_08 WA -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 WA -
testcase_16 WA -
testcase_17 RE -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,Q = map(int, input().split())
A = list(map(int,input().split()))
B = [0 for i in range(N)]       
C = []
X = []
Y = []
for i in range(Q):
    c,x,y = map(str,input().split())
    C.append(c)
    X.append(x)
    Y.append(y)
for i in range(Q):
    if C[i] == 'A':
        if int(X[i]) <= i+1 and i <= int(Y[i]):
            A[int(X[i])-1] += int(Y[i])
    elif C[i] == 'B':
        B[i] += A[i]
print(B)
0