結果
| 問題 |
No.3050 Prefix Removal
|
| コンテスト | |
| ユーザー |
sasa8uyauya
|
| 提出日時 | 2025-03-08 04:54:57 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 313 bytes |
| コンパイル時間 | 377 ms |
| コンパイル使用メモリ | 82,108 KB |
| 実行使用メモリ | 201,528 KB |
| 最終ジャッジ日時 | 2025-03-08 04:55:18 |
| 合計ジャッジ時間 | 20,215 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 54 WA * 1 |
ソースコード
n,k=map(int,input().split()) a=list(map(int,input().split())) for i in range(1,n): a[i]+=a[i-1] X=1<<60 a1=-X a2=0 from heapq import heappush,heappop q=[] for i in range(k-1): heappush(q,-a[i]) a2+=a[i] for i in range(k-1,n): a1=max(a1,a[i]*k-a2) heappush(q,-a[i]) a2+=a[i] a2-=-heappop(q) print(a1)
sasa8uyauya