結果

問題 No.8121 [Deleted]
ユーザー Katu2ou
提出日時 2025-04-01 22:40:38
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 460 bytes
コンパイル時間 253 ms
コンパイル使用メモリ 12,160 KB
実行使用メモリ 33,364 KB
最終ジャッジ日時 2025-04-01 22:40:48
合計ジャッジ時間 9,039 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    n, m = map(int, input().split())
    a = list(map(int, input().split()))
    
    result = []
    
    for _ in range(m):
        query = list(map(int, input().split()))
        
        if query[0] == 1:
            c, d = query[1], query[2]
            a[c - 1] += d
        else:
            c, d = query[1], query[2]
            result.append(str(max(a[c - 1], 0)))
    
    print("\n".join(result))

if __name__ == "__main__":
    solve()
0