結果
| 問題 | No.3684 chokudai_niku.png |
| コンテスト | |
| ユーザー |
MM
|
| 提出日時 | 2026-09-05 13:30:45 |
| 言語 | PyPy3 (7.3.23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 262 bytes |
| 記録 | |
| コンパイル時間 | 227 ms |
| コンパイル使用メモリ | 95,820 KB |
| 実行使用メモリ | 154,068 KB |
| 最終ジャッジ日時 | 2026-09-05 13:31:08 |
| 合計ジャッジ時間 | 11,214 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 4 WA * 40 |
ソースコード
N, M = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) S = [0] for (a,b) in zip(A,B): nxt = S[-1] + max(b-a, 0) S.append(nxt) ans = 0 for i in range(N-M+1): tmp = S[i+M] - S[i] ans = max(ans, tmp) print(ans)
MM