結果
問題 |
No.1441 MErGe
|
ユーザー |
![]() |
提出日時 | 2021-03-26 22:19:52 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 283 bytes |
コンパイル時間 | 997 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 545,360 KB |
最終ジャッジ日時 | 2024-11-28 23:46:20 |
合計ジャッジ時間 | 37,212 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 TLE * 15 MLE * 2 |
ソースコード
import itertools N,Q=map(int,input().split()) A = list(map(int,input().split())) SA = list(itertools.accumulate(A))+[0] for i in range(Q): t,l,r=map(int,input().split()) l-=1 r-=1 if t==1: SA = SA[:l]+[SA[r]]+SA[r+1:] if t==2: print(SA[r]-SA[l-1])