結果
問題 |
No.1000 Point Add and Array Add
|
ユーザー |
![]() |
提出日時 | 2020-02-28 22:42:47 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 383 bytes |
コンパイル時間 | 125 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 57,608 KB |
最終ジャッジ日時 | 2024-10-13 18:34:01 |
合計ジャッジ時間 | 13,831 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 14 TLE * 1 -- * 7 |
ソースコード
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)