結果

問題 No.2309 [Cherry 5th Tune D] 夏の先取り
ユーザー ああいいああいい
提出日時 2023-05-22 23:09:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 853 bytes
コンパイル時間 331 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 77,608 KB
最終ジャッジ日時 2023-08-24 03:52:09
合計ジャッジ時間 9,258 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
75,916 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 131 ms
77,220 KB
testcase_21 AC 132 ms
76,652 KB
testcase_22 AC 127 ms
76,728 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 127 ms
76,852 KB
testcase_28 AC 136 ms
77,084 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 81 ms
75,812 KB
testcase_37 AC 72 ms
71,396 KB
testcase_38 AC 86 ms
75,980 KB
testcase_39 AC 83 ms
75,756 KB
testcase_40 AC 83 ms
75,700 KB
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 AC 133 ms
76,960 KB
testcase_46 AC 137 ms
76,692 KB
testcase_47 WA -
testcase_48 AC 76 ms
71,284 KB
testcase_49 AC 76 ms
71,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

for _ in range(T):
    a,b,c = map(int,input().split())
    x,y,z,w = map(int,input().split())

    u = min(a,b,c)
    ans = 0
    for i in range(u + 1):
        tmp = i * w
        A = a - i
        B = b - i
        C = c - i

        k = min(A,B)
        tt = k * x
        if k == A:
            tt += min(B - k,C) * y
        else:
            tt += min(A - k,C) * z
        if tmp + tt > ans:
            ans = tmp + tt
        k = min(B,C)
        tt = k * y
        if k == B:
            tt += min(A,C - k) * z
        else:
            tt += min(A,B - k) * x
        if tmp + tt > ans:
            ans = tmp + tt
        k = min(A,C)
        tt = k * z
        if k == A:
            tt += min(B,C - k) * y
        else:
            tt += min(A - k,B) * x
        if tmp + tt > ans:
            ans = tmp + tt
    print(ans)
0