結果
| 問題 | No.1441 MErGe |
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2021-03-26 22:19:52 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 283 bytes |
| 記録 | |
| コンパイル時間 | 73 ms |
| コンパイル使用メモリ | 80,768 KB |
| 実行使用メモリ | 331,892 KB |
| 最終ジャッジ日時 | 2026-10-01 15:40:01 |
| 合計ジャッジ時間 | 9,764 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 TLE * 1 -- * 16 |
ソースコード
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])
H20