結果

問題 No.1199 お菓子配り-2
ユーザー takakintakakin
提出日時 2020-09-06 20:53:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 250 ms / 1,000 ms
コード長 243 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 10,732 KB
実行使用メモリ 8,576 KB
最終ジャッジ日時 2023-08-19 14:18:28
合計ジャッジ時間 12,319 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,968 KB
testcase_01 AC 13 ms
7,884 KB
testcase_02 AC 14 ms
7,832 KB
testcase_03 AC 69 ms
8,348 KB
testcase_04 AC 154 ms
8,340 KB
testcase_05 AC 17 ms
8,188 KB
testcase_06 AC 21 ms
8,260 KB
testcase_07 AC 81 ms
8,280 KB
testcase_08 AC 107 ms
8,288 KB
testcase_09 AC 69 ms
8,248 KB
testcase_10 AC 27 ms
8,316 KB
testcase_11 AC 56 ms
8,324 KB
testcase_12 AC 55 ms
8,344 KB
testcase_13 AC 27 ms
8,408 KB
testcase_14 AC 26 ms
8,328 KB
testcase_15 AC 24 ms
7,912 KB
testcase_16 AC 107 ms
8,384 KB
testcase_17 AC 59 ms
8,248 KB
testcase_18 AC 112 ms
8,336 KB
testcase_19 AC 39 ms
8,280 KB
testcase_20 AC 192 ms
8,416 KB
testcase_21 AC 124 ms
8,340 KB
testcase_22 AC 71 ms
8,200 KB
testcase_23 AC 94 ms
8,272 KB
testcase_24 AC 125 ms
8,340 KB
testcase_25 AC 29 ms
8,256 KB
testcase_26 AC 135 ms
8,576 KB
testcase_27 AC 110 ms
8,416 KB
testcase_28 AC 243 ms
8,384 KB
testcase_29 AC 246 ms
8,468 KB
testcase_30 AC 250 ms
8,496 KB
testcase_31 AC 242 ms
8,496 KB
testcase_32 AC 246 ms
8,424 KB
testcase_33 AC 247 ms
8,424 KB
testcase_34 AC 244 ms
8,388 KB
testcase_35 AC 240 ms
8,476 KB
testcase_36 AC 243 ms
8,520 KB
testcase_37 AC 242 ms
8,432 KB
testcase_38 AC 242 ms
8,400 KB
testcase_39 AC 238 ms
8,420 KB
testcase_40 AC 239 ms
8,412 KB
testcase_41 AC 238 ms
8,420 KB
testcase_42 AC 239 ms
8,368 KB
testcase_43 AC 237 ms
8,568 KB
testcase_44 AC 239 ms
8,436 KB
testcase_45 AC 239 ms
8,532 KB
testcase_46 AC 235 ms
8,516 KB
testcase_47 AC 241 ms
8,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
n,m=map(int,input().split())
A=[]
for _ in range(n):
	A.append(sum([int(i) for i in input().split()]))
m1,m2=0,-float("inf")
for a in A:
	m1,m2=max(m1,m2-a),max(m1+a,m2)
print(max(m1,m2))
0