結果

問題 No.1199 お菓子配り-2
ユーザー tonyu0tonyu0
提出日時 2020-08-28 23:56:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 748 ms / 1,000 ms
コード長 297 bytes
コンパイル時間 618 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 44,180 KB
最終ジャッジ日時 2024-04-26 14:32:32
合計ジャッジ時間 35,815 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 528 ms
43,412 KB
testcase_01 AC 467 ms
43,792 KB
testcase_02 AC 485 ms
43,924 KB
testcase_03 AC 570 ms
44,036 KB
testcase_04 AC 666 ms
43,712 KB
testcase_05 AC 497 ms
43,932 KB
testcase_06 AC 504 ms
43,920 KB
testcase_07 AC 562 ms
43,792 KB
testcase_08 AC 596 ms
43,792 KB
testcase_09 AC 548 ms
43,548 KB
testcase_10 AC 496 ms
44,180 KB
testcase_11 AC 551 ms
43,584 KB
testcase_12 AC 552 ms
43,916 KB
testcase_13 AC 539 ms
43,920 KB
testcase_14 AC 520 ms
44,048 KB
testcase_15 AC 517 ms
43,664 KB
testcase_16 AC 572 ms
43,584 KB
testcase_17 AC 529 ms
43,544 KB
testcase_18 AC 583 ms
43,672 KB
testcase_19 AC 504 ms
43,680 KB
testcase_20 AC 663 ms
43,920 KB
testcase_21 AC 614 ms
43,540 KB
testcase_22 AC 561 ms
43,544 KB
testcase_23 AC 582 ms
43,540 KB
testcase_24 AC 617 ms
43,928 KB
testcase_25 AC 500 ms
43,664 KB
testcase_26 AC 582 ms
43,664 KB
testcase_27 AC 558 ms
43,932 KB
testcase_28 AC 708 ms
43,796 KB
testcase_29 AC 735 ms
44,180 KB
testcase_30 AC 741 ms
43,588 KB
testcase_31 AC 748 ms
43,536 KB
testcase_32 AC 715 ms
43,664 KB
testcase_33 AC 693 ms
43,916 KB
testcase_34 AC 685 ms
43,936 KB
testcase_35 AC 688 ms
43,544 KB
testcase_36 AC 696 ms
43,580 KB
testcase_37 AC 693 ms
43,924 KB
testcase_38 AC 709 ms
44,052 KB
testcase_39 AC 690 ms
43,664 KB
testcase_40 AC 681 ms
43,644 KB
testcase_41 AC 684 ms
43,932 KB
testcase_42 AC 687 ms
43,548 KB
testcase_43 AC 682 ms
43,916 KB
testcase_44 AC 691 ms
44,012 KB
testcase_45 AC 726 ms
43,668 KB
testcase_46 AC 692 ms
44,052 KB
testcase_47 AC 727 ms
43,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import numpy as np
readline = sys.stdin.readline

n, m = map(int, readline().split())
a = b = 0

for i in range(n):
    umai = np.sum(np.array(readline().split(),
                           dtype=np.int64), dtype=np.int64)
    a, b = max(b - umai, a), max(a + umai, b)
print(max(a, b))
0