結果
問題 |
No.1199 お菓子配り-2
|
ユーザー |
|
提出日時 | 2020-12-15 23:18:01 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 387 bytes |
コンパイル時間 | 177 ms |
コンパイル使用メモリ | 82,368 KB |
実行使用メモリ | 77,060 KB |
最終ジャッジ日時 | 2024-09-20 02:26:58 |
合計ジャッジ時間 | 12,417 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | WA * 45 |
ソースコード
N,M = map(int,input().split()) A = [] for _ in range(N): A.append(sum(list(map(int,input().split())))) A.reverse() count,ans = 0,0 for i in range(N): if i%2 == 0: count += A[i] else: count -= A[i] ans = max(ans,count) count = 0 for i in range(1,N): if i%2 != 0: count += A[i] else: count -= A[i] ans = max(ans,count) print(ans)