結果
| 問題 | No.3684 chokudai_niku.png |
| コンテスト | |
| ユーザー |
回転
|
| 提出日時 | 2026-09-05 14:32:13 |
| 言語 | PyPy3 (7.3.23) |
| 結果 |
AC
|
| 実行時間 | 131 ms / 2,000 ms |
| + 392µs | |
| コード長 | 289 bytes |
| 記録 | |
| コンパイル時間 | 294 ms |
| コンパイル使用メモリ | 95,952 KB |
| 実行使用メモリ | 141,816 KB |
| 最終ジャッジ日時 | 2026-09-05 14:32:26 |
| 合計ジャッジ時間 | 11,484 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge6_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 44 |
ソースコード
from itertools import accumulate
N,M = list(map(int,input().split()))
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = [max(A[i] - B[i],0) for i in range(N)]
S = [0] + list(accumulate(C))
ans = 0
for i in range(N-M+1):
ans = max(ans, S[i+M] - S[i])
print(ans)
回転