結果

問題 No.1122 Plane Tickets
ユーザー asumo0729asumo0729
提出日時 2020-07-22 23:57:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 874 bytes
コンパイル時間 547 ms
コンパイル使用メモリ 10,836 KB
実行使用メモリ 8,592 KB
最終ジャッジ日時 2023-09-05 05:50:23
合計ジャッジ時間 3,679 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,388 KB
testcase_01 AC 18 ms
8,516 KB
testcase_02 AC 19 ms
8,516 KB
testcase_03 AC 18 ms
8,420 KB
testcase_04 AC 18 ms
8,436 KB
testcase_05 AC 19 ms
8,376 KB
testcase_06 AC 19 ms
8,532 KB
testcase_07 AC 19 ms
8,516 KB
testcase_08 WA -
testcase_09 AC 19 ms
8,548 KB
testcase_10 AC 19 ms
8,444 KB
testcase_11 AC 18 ms
8,416 KB
testcase_12 AC 19 ms
8,480 KB
testcase_13 AC 19 ms
8,572 KB
testcase_14 AC 19 ms
8,472 KB
testcase_15 AC 19 ms
8,392 KB
testcase_16 AC 18 ms
8,500 KB
testcase_17 AC 19 ms
8,536 KB
testcase_18 AC 18 ms
8,380 KB
testcase_19 AC 19 ms
8,560 KB
testcase_20 AC 18 ms
8,372 KB
testcase_21 AC 19 ms
8,520 KB
testcase_22 AC 18 ms
8,560 KB
testcase_23 AC 19 ms
8,488 KB
testcase_24 WA -
testcase_25 AC 19 ms
8,564 KB
testcase_26 AC 18 ms
8,376 KB
testcase_27 AC 19 ms
8,480 KB
testcase_28 WA -
testcase_29 AC 19 ms
8,436 KB
testcase_30 AC 18 ms
8,424 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 19 ms
8,484 KB
testcase_35 AC 19 ms
8,512 KB
testcase_36 AC 19 ms
8,556 KB
testcase_37 AC 19 ms
8,572 KB
testcase_38 AC 18 ms
8,592 KB
testcase_39 AC 19 ms
8,416 KB
testcase_40 AC 19 ms
8,380 KB
testcase_41 AC 18 ms
8,564 KB
testcase_42 AC 19 ms
8,412 KB
testcase_43 AC 19 ms
8,392 KB
testcase_44 AC 19 ms
8,424 KB
testcase_45 AC 19 ms
8,408 KB
testcase_46 AC 18 ms
8,416 KB
testcase_47 AC 19 ms
8,428 KB
testcase_48 AC 18 ms
8,416 KB
testcase_49 WA -
testcase_50 AC 19 ms
8,412 KB
testcase_51 WA -
testcase_52 WA -
testcase_53 WA -
testcase_54 WA -
testcase_55 WA -
testcase_56 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
import copy
a=list(map(int,input().split()))

w=[[0,1,2],[1,2,3],[2,3,4],[0,3,4],[0,1,4]]
ans1=[]
for x in range(len(w)):
    ans=0
    e=copy.copy(a)
    p=w[x][0]
    q=w[x][1]
    r=w[x][2]
    min_1=min(e[p],e[q],e[r])
    e[p]=e[p]-min_1
    e[q]=e[q]-min_1
    e[r]=e[r]-min_1
    ans+=min_1
    for y in range(len(w)):
        pp=w[y][0]
        qq=w[y][1]
        rr=w[y][2]
        min_2=min(e[pp],e[qq],e[rr])
        e[pp]=e[pp]-min_2
        e[qq]=e[qq]-min_2
        e[rr]=e[rr]-min_2
        ans+=min_2
        for z in range(len(w)):
            ppp=w[z][0]
            qqq=w[z][1]
            rrr=w[z][2]
            min_3=min(e[ppp],e[qqq],e[rrr])
            e[ppp]=e[ppp]-min_3
            e[qqq]=e[qqq]-min_3
            e[rrr]=e[rrr]-min_3
            ans+=min_3
            
            ans1.append(ans)
        
    
print(max(ans1)) 
0