結果

問題 No.1199 お菓子配り-2
ユーザー convexineqconvexineq
提出日時 2021-05-11 02:56:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 160 ms / 1,000 ms
コード長 186 bytes
コンパイル時間 481 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 75,368 KB
最終ジャッジ日時 2023-10-21 07:59:11
合計ジャッジ時間 14,133 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,564 KB
testcase_01 AC 37 ms
51,548 KB
testcase_02 AC 36 ms
51,576 KB
testcase_03 AC 80 ms
74,736 KB
testcase_04 AC 119 ms
74,988 KB
testcase_05 AC 45 ms
60,388 KB
testcase_06 AC 48 ms
62,960 KB
testcase_07 AC 82 ms
74,672 KB
testcase_08 AC 93 ms
74,700 KB
testcase_09 AC 78 ms
74,672 KB
testcase_10 AC 51 ms
68,236 KB
testcase_11 AC 72 ms
74,652 KB
testcase_12 AC 70 ms
74,624 KB
testcase_13 AC 51 ms
68,408 KB
testcase_14 AC 53 ms
66,944 KB
testcase_15 AC 50 ms
65,108 KB
testcase_16 AC 93 ms
74,716 KB
testcase_17 AC 74 ms
74,656 KB
testcase_18 AC 102 ms
74,844 KB
testcase_19 AC 66 ms
74,600 KB
testcase_20 AC 133 ms
75,144 KB
testcase_21 AC 105 ms
74,892 KB
testcase_22 AC 83 ms
74,832 KB
testcase_23 AC 94 ms
74,852 KB
testcase_24 AC 104 ms
74,880 KB
testcase_25 AC 53 ms
69,532 KB
testcase_26 AC 108 ms
74,824 KB
testcase_27 AC 98 ms
74,768 KB
testcase_28 AC 156 ms
75,340 KB
testcase_29 AC 158 ms
75,356 KB
testcase_30 AC 153 ms
75,300 KB
testcase_31 AC 157 ms
75,336 KB
testcase_32 AC 158 ms
75,340 KB
testcase_33 AC 159 ms
75,344 KB
testcase_34 AC 160 ms
75,336 KB
testcase_35 AC 156 ms
75,312 KB
testcase_36 AC 158 ms
75,272 KB
testcase_37 AC 154 ms
75,316 KB
testcase_38 AC 149 ms
75,360 KB
testcase_39 AC 159 ms
75,312 KB
testcase_40 AC 157 ms
75,368 KB
testcase_41 AC 153 ms
75,340 KB
testcase_42 AC 157 ms
75,316 KB
testcase_43 AC 148 ms
75,340 KB
testcase_44 AC 156 ms
75,296 KB
testcase_45 AC 157 ms
75,304 KB
testcase_46 AC 157 ms
75,320 KB
testcase_47 AC 157 ms
75,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
INF = 10**18
p, q = 0,-INF
for _ in range(n):
    x = sum(map(int,input().split()))
    pp = max(p,q-x)
    qq = max(q,p+x)
    p,q = pp,qq
print(max(p,q))
0