結果

問題 No.1199 お菓子配り-2
ユーザー titiatitia
提出日時 2020-08-28 21:32:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 231 ms / 1,000 ms
コード長 203 bytes
コンパイル時間 205 ms
コンパイル使用メモリ 10,560 KB
実行使用メモリ 8,436 KB
最終ジャッジ日時 2023-08-08 22:13:45
合計ジャッジ時間 10,777 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,804 KB
testcase_01 AC 15 ms
7,788 KB
testcase_02 AC 15 ms
7,952 KB
testcase_03 AC 69 ms
8,336 KB
testcase_04 AC 152 ms
8,288 KB
testcase_05 AC 19 ms
7,956 KB
testcase_06 AC 22 ms
7,888 KB
testcase_07 AC 83 ms
8,248 KB
testcase_08 AC 105 ms
8,308 KB
testcase_09 AC 69 ms
8,160 KB
testcase_10 AC 29 ms
7,808 KB
testcase_11 AC 57 ms
8,204 KB
testcase_12 AC 56 ms
8,284 KB
testcase_13 AC 29 ms
8,380 KB
testcase_14 AC 27 ms
7,800 KB
testcase_15 AC 26 ms
7,908 KB
testcase_16 AC 102 ms
8,240 KB
testcase_17 AC 57 ms
8,232 KB
testcase_18 AC 107 ms
8,252 KB
testcase_19 AC 39 ms
7,804 KB
testcase_20 AC 178 ms
8,388 KB
testcase_21 AC 115 ms
8,360 KB
testcase_22 AC 68 ms
7,836 KB
testcase_23 AC 91 ms
8,248 KB
testcase_24 AC 117 ms
8,416 KB
testcase_25 AC 31 ms
7,892 KB
testcase_26 AC 131 ms
8,248 KB
testcase_27 AC 109 ms
8,372 KB
testcase_28 AC 229 ms
8,436 KB
testcase_29 AC 229 ms
8,336 KB
testcase_30 AC 229 ms
8,256 KB
testcase_31 AC 227 ms
8,384 KB
testcase_32 AC 229 ms
8,168 KB
testcase_33 AC 228 ms
8,396 KB
testcase_34 AC 230 ms
8,240 KB
testcase_35 AC 228 ms
8,264 KB
testcase_36 AC 230 ms
8,244 KB
testcase_37 AC 231 ms
8,244 KB
testcase_38 AC 229 ms
8,248 KB
testcase_39 AC 229 ms
8,260 KB
testcase_40 AC 230 ms
8,436 KB
testcase_41 AC 229 ms
8,312 KB
testcase_42 AC 230 ms
8,316 KB
testcase_43 AC 230 ms
8,320 KB
testcase_44 AC 227 ms
8,424 KB
testcase_45 AC 228 ms
8,252 KB
testcase_46 AC 230 ms
8,244 KB
testcase_47 AC 229 ms
8,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N,M=map(int,input().split())
A=[sum(map(int,input().split())) for i in range(N)]

E1=0
E2=-1<<30

for a in A:
    E1,E2=max(E1,E2-a),max(E1+a,E2)

print(max(E1,E2))
0