結果

問題 No.2701 A cans -> B cans
ユーザー hirayuu_ychirayuu_yc
提出日時 2024-02-29 16:48:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 420 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 72,716 KB
最終ジャッジ日時 2024-02-29 18:18:09
合計ジャッジ時間 38,605 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,460 KB
testcase_01 AC 36 ms
53,460 KB
testcase_02 AC 36 ms
53,460 KB
testcase_03 AC 50 ms
64,452 KB
testcase_04 AC 51 ms
64,452 KB
testcase_05 AC 51 ms
64,452 KB
testcase_06 AC 50 ms
64,452 KB
testcase_07 AC 50 ms
64,452 KB
testcase_08 AC 50 ms
64,452 KB
testcase_09 AC 51 ms
64,452 KB
testcase_10 AC 51 ms
64,452 KB
testcase_11 AC 51 ms
64,452 KB
testcase_12 AC 50 ms
64,452 KB
testcase_13 AC 50 ms
64,452 KB
testcase_14 AC 49 ms
64,452 KB
testcase_15 AC 50 ms
64,452 KB
testcase_16 AC 49 ms
64,452 KB
testcase_17 AC 50 ms
64,452 KB
testcase_18 AC 50 ms
64,452 KB
testcase_19 AC 51 ms
64,452 KB
testcase_20 AC 50 ms
64,452 KB
testcase_21 AC 50 ms
64,452 KB
testcase_22 AC 50 ms
64,452 KB
testcase_23 AC 259 ms
70,636 KB
testcase_24 AC 250 ms
70,636 KB
testcase_25 AC 293 ms
70,628 KB
testcase_26 AC 696 ms
72,708 KB
testcase_27 AC 653 ms
70,656 KB
testcase_28 AC 687 ms
70,652 KB
testcase_29 AC 667 ms
72,716 KB
testcase_30 AC 663 ms
70,648 KB
testcase_31 AC 671 ms
70,648 KB
testcase_32 AC 665 ms
70,652 KB
testcase_33 AC 657 ms
70,656 KB
testcase_34 AC 663 ms
72,708 KB
testcase_35 AC 653 ms
70,652 KB
testcase_36 AC 653 ms
70,652 KB
testcase_37 AC 673 ms
70,652 KB
testcase_38 AC 695 ms
70,648 KB
testcase_39 AC 662 ms
70,656 KB
testcase_40 AC 675 ms
70,648 KB
testcase_41 AC 650 ms
70,656 KB
testcase_42 AC 688 ms
70,656 KB
testcase_43 AC 665 ms
72,716 KB
testcase_44 AC 703 ms
70,656 KB
testcase_45 AC 667 ms
70,648 KB
testcase_46 AC 694 ms
70,656 KB
testcase_47 AC 739 ms
70,656 KB
testcase_48 AC 667 ms
70,656 KB
testcase_49 AC 712 ms
70,656 KB
testcase_50 AC 693 ms
70,656 KB
testcase_51 AC 722 ms
70,656 KB
testcase_52 AC 716 ms
70,656 KB
testcase_53 AC 690 ms
70,656 KB
testcase_54 AC 744 ms
70,656 KB
testcase_55 WA -
testcase_56 WA -
testcase_57 WA -
testcase_58 WA -
testcase_59 WA -
testcase_60 WA -
testcase_61 WA -
testcase_62 WA -
testcase_63 WA -
testcase_64 WA -
testcase_65 WA -
testcase_66 AC 1,206 ms
70,656 KB
testcase_67 AC 1,394 ms
70,656 KB
testcase_68 AC 1,294 ms
72,716 KB
testcase_69 AC 1,345 ms
70,656 KB
testcase_70 AC 1,314 ms
70,652 KB
testcase_71 AC 1,399 ms
70,656 KB
testcase_72 AC 1,337 ms
72,716 KB
testcase_73 AC 1,316 ms
70,648 KB
testcase_74 AC 1,331 ms
72,716 KB
testcase_75 AC 1,260 ms
72,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
#sys.setrecursionlimit((1<<19)-1)
#import pypyjit
#pypyjit.set_param('max_unroll_recursion=-1')
input=sys.stdin.buffer.readline

N,M=map(int,input().split())
can=[tuple(map(int,input().split())) for i in range(N)]
ans=0
dp=[0]*(M+1)
for i in range(M+1):
    now=0
    for a,b,c in can:
        if i>=a:
            now=max(now,(((i-a)//(a-b)+1)*c*b+dp[(i-a)%(a-b)]))
    dp[i]=now
    if i>=1:
    	print(now)
0