Submission #19661694


Source Code Expand

Copy
import sys
def main():
    input = sys.stdin.readline
    R, G, B = map(int, input().split())
    RGB = R + G + B
    GB = G + B
    INF = 10**18
    dp = [INF] * (RGB + 1)
    dp[RGB] = 0
    for i in range(-1000, 1000):
        for r in range(RGB):
            t = INF
            if r >= GB: t = abs(-100 - i)
            elif r >= B: t = abs(i)
            else: t = abs(100 - i)
            dp[r] = min(dp[r], dp[r + 1] + t)
    print(dp[0])

if __name__ == '__main__':
    main()

Submission Info

Submission Time
Task D - マーブル
User w0mbat
Language PyPy3 (7.3.0)
Score 0
Code Size 506 Byte
Status MLE
Exec Time 103 ms
Memory 68304 KB

Judge Result

Set Name sub1 sub2 All
Score / Max Score 0 / 10 0 / 30 0 / 60
Status
MLE × 29
MLE × 57
MLE × 85
Set Name Test Cases
sub1 sample_01_ABC.txt, test_ABC_01.txt, test_ABC_02.txt, test_ABC_03.txt, test_ABC_04.txt, test_ABC_05.txt, test_ABC_06.txt, test_ABC_07.txt, test_ABC_08.txt, test_ABC_09.txt, test_ABC_10.txt, test_ABC_11.txt, test_ABC_12.txt, test_ABC_13.txt, test_ABC_14.txt, test_ABC_15.txt, test_ABC_16.txt, test_ABC_17.txt, test_ABC_18.txt, test_ABC_19.txt, test_ABC_20.txt, test_ABC_21.txt, test_ABC_22.txt, test_ABC_23.txt, test_ABC_24.txt, test_ABC_25.txt, test_ABC_26.txt, test_ABC_27.txt, test_ABC_28.txt
sub2 sample_01_ABC.txt, sample_02_BC.txt, test_ABC_01.txt, test_ABC_02.txt, test_ABC_03.txt, test_ABC_04.txt, test_ABC_05.txt, test_ABC_06.txt, test_ABC_07.txt, test_ABC_08.txt, test_ABC_09.txt, test_ABC_10.txt, test_ABC_11.txt, test_ABC_12.txt, test_ABC_13.txt, test_ABC_14.txt, test_ABC_15.txt, test_ABC_16.txt, test_ABC_17.txt, test_ABC_18.txt, test_ABC_19.txt, test_ABC_20.txt, test_ABC_21.txt, test_ABC_22.txt, test_ABC_23.txt, test_ABC_24.txt, test_ABC_25.txt, test_ABC_26.txt, test_ABC_27.txt, test_ABC_28.txt, test_BC_29.txt, test_BC_30.txt, test_BC_31.txt, test_BC_32.txt, test_BC_33.txt, test_BC_34.txt, test_BC_35.txt, test_BC_36.txt, test_BC_37.txt, test_BC_38.txt, test_BC_39.txt, test_BC_40.txt, test_BC_41.txt, test_BC_42.txt, test_BC_43.txt, test_BC_44.txt, test_BC_45.txt, test_BC_46.txt, test_BC_47.txt, test_BC_48.txt, test_BC_49.txt, test_BC_50.txt, test_BC_51.txt, test_BC_52.txt, test_BC_53.txt, test_BC_54.txt, test_BC_55.txt
All sample_01_ABC.txt, sample_02_BC.txt, sample_03_C.txt, test_ABC_01.txt, test_ABC_02.txt, test_ABC_03.txt, test_ABC_04.txt, test_ABC_05.txt, test_ABC_06.txt, test_ABC_07.txt, test_ABC_08.txt, test_ABC_09.txt, test_ABC_10.txt, test_ABC_11.txt, test_ABC_12.txt, test_ABC_13.txt, test_ABC_14.txt, test_ABC_15.txt, test_ABC_16.txt, test_ABC_17.txt, test_ABC_18.txt, test_ABC_19.txt, test_ABC_20.txt, test_ABC_21.txt, test_ABC_22.txt, test_ABC_23.txt, test_ABC_24.txt, test_ABC_25.txt, test_ABC_26.txt, test_ABC_27.txt, test_ABC_28.txt, test_BC_29.txt, test_BC_30.txt, test_BC_31.txt, test_BC_32.txt, test_BC_33.txt, test_BC_34.txt, test_BC_35.txt, test_BC_36.txt, test_BC_37.txt, test_BC_38.txt, test_BC_39.txt, test_BC_40.txt, test_BC_41.txt, test_BC_42.txt, test_BC_43.txt, test_BC_44.txt, test_BC_45.txt, test_BC_46.txt, test_BC_47.txt, test_BC_48.txt, test_BC_49.txt, test_BC_50.txt, test_BC_51.txt, test_BC_52.txt, test_BC_53.txt, test_BC_54.txt, test_BC_55.txt, test_C_56.txt, test_C_57.txt, test_C_58.txt, test_C_59.txt, test_C_60.txt, test_C_61.txt, test_C_62.txt, test_C_63.txt, test_C_64.txt, test_C_65.txt, test_C_66.txt, test_C_67.txt, test_C_68.txt, test_C_69.txt, test_C_70.txt, test_C_71.txt, test_C_72.txt, test_C_73.txt, test_C_74.txt, test_C_75.txt, test_C_76.txt, test_C_77.txt, test_C_78.txt, test_C_79.txt, test_C_80.txt, test_C_81.txt, test_C_82.txt
Case Name Status Exec Time Memory
sample_01_ABC.txt MLE 83 ms 67868 KB
sample_02_BC.txt MLE 74 ms 67916 KB
sample_03_C.txt MLE 100 ms 67996 KB
test_ABC_01.txt MLE 71 ms 67992 KB
test_ABC_02.txt MLE 71 ms 67480 KB
test_ABC_03.txt MLE 71 ms 67844 KB
test_ABC_04.txt MLE 69 ms 68000 KB
test_ABC_05.txt MLE 70 ms 67868 KB
test_ABC_06.txt MLE 71 ms 67896 KB
test_ABC_07.txt MLE 70 ms 67872 KB
test_ABC_08.txt MLE 67 ms 68092 KB
test_ABC_09.txt MLE 69 ms 67708 KB
test_ABC_10.txt MLE 69 ms 68116 KB
test_ABC_11.txt MLE 69 ms 67704 KB
test_ABC_12.txt MLE 69 ms 67752 KB
test_ABC_13.txt MLE 69 ms 67756 KB
test_ABC_14.txt MLE 71 ms 67796 KB
test_ABC_15.txt MLE 71 ms 67708 KB
test_ABC_16.txt MLE 74 ms 67776 KB
test_ABC_17.txt MLE 71 ms 67904 KB
test_ABC_18.txt MLE 71 ms 68144 KB
test_ABC_19.txt MLE 70 ms 68272 KB
test_ABC_20.txt MLE 72 ms 67828 KB
test_ABC_21.txt MLE 71 ms 67976 KB
test_ABC_22.txt MLE 69 ms 67856 KB
test_ABC_23.txt MLE 67 ms 67704 KB
test_ABC_24.txt MLE 73 ms 67788 KB
test_ABC_25.txt MLE 73 ms 67744 KB
test_ABC_26.txt MLE 72 ms 67796 KB
test_ABC_27.txt MLE 70 ms 67560 KB
test_ABC_28.txt MLE 70 ms 67916 KB
test_BC_29.txt MLE 72 ms 67900 KB
test_BC_30.txt MLE 71 ms 67920 KB
test_BC_31.txt MLE 78 ms 67996 KB
test_BC_32.txt MLE 76 ms 68120 KB
test_BC_33.txt MLE 79 ms 68180 KB
test_BC_34.txt MLE 76 ms 68028 KB
test_BC_35.txt MLE 75 ms 67760 KB
test_BC_36.txt MLE 73 ms 67600 KB
test_BC_37.txt MLE 76 ms 68096 KB
test_BC_38.txt MLE 79 ms 67768 KB
test_BC_39.txt MLE 75 ms 67788 KB
test_BC_40.txt MLE 76 ms 67912 KB
test_BC_41.txt MLE 77 ms 67952 KB
test_BC_42.txt MLE 81 ms 68096 KB
test_BC_43.txt MLE 75 ms 68056 KB
test_BC_44.txt MLE 79 ms 68252 KB
test_BC_45.txt MLE 75 ms 67860 KB
test_BC_46.txt MLE 77 ms 67908 KB
test_BC_47.txt MLE 80 ms 67748 KB
test_BC_48.txt MLE 81 ms 67912 KB
test_BC_49.txt MLE 77 ms 67792 KB
test_BC_50.txt MLE 75 ms 67932 KB
test_BC_51.txt MLE 74 ms 67980 KB
test_BC_52.txt MLE 70 ms 67960 KB
test_BC_53.txt MLE 71 ms 67628 KB
test_BC_54.txt MLE 72 ms 67548 KB
test_BC_55.txt MLE 83 ms 68092 KB
test_C_56.txt MLE 83 ms 68084 KB
test_C_57.txt MLE 94 ms 68108 KB
test_C_58.txt MLE 94 ms 68304 KB
test_C_59.txt MLE 96 ms 67840 KB
test_C_60.txt MLE 84 ms 67984 KB
test_C_61.txt MLE 88 ms 68032 KB
test_C_62.txt MLE 88 ms 68200 KB
test_C_63.txt MLE 90 ms 67980 KB
test_C_64.txt MLE 89 ms 67824 KB
test_C_65.txt MLE 92 ms 67984 KB
test_C_66.txt MLE 89 ms 67944 KB
test_C_67.txt MLE 92 ms 67872 KB
test_C_68.txt MLE 84 ms 68072 KB
test_C_69.txt MLE 85 ms 68192 KB
test_C_70.txt MLE 87 ms 67880 KB
test_C_71.txt MLE 94 ms 67856 KB
test_C_72.txt MLE 98 ms 68128 KB
test_C_73.txt MLE 92 ms 68016 KB
test_C_74.txt MLE 93 ms 68084 KB
test_C_75.txt MLE 95 ms 68224 KB
test_C_76.txt MLE 90 ms 67844 KB
test_C_77.txt MLE 90 ms 68036 KB
test_C_78.txt MLE 92 ms 68168 KB
test_C_79.txt MLE 82 ms 67860 KB
test_C_80.txt MLE 77 ms 68012 KB
test_C_81.txt MLE 78 ms 67688 KB
test_C_82.txt MLE 103 ms 68236 KB