結果

問題 No.1122 Plane Tickets
ユーザー asumo0729asumo0729
提出日時 2020-07-22 23:19:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 878 bytes
コンパイル時間 544 ms
コンパイル使用メモリ 10,904 KB
実行使用メモリ 20,428 KB
最終ジャッジ日時 2023-09-05 04:26:43
合計ジャッジ時間 20,379 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 278 ms
10,152 KB
testcase_01 AC 285 ms
16,052 KB
testcase_02 WA -
testcase_03 AC 284 ms
10,068 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 299 ms
20,148 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 299 ms
20,144 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 304 ms
20,156 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 307 ms
19,860 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 293 ms
17,968 KB
testcase_43 WA -
testcase_44 AC 281 ms
10,068 KB
testcase_45 WA -
testcase_46 AC 282 ms
10,028 KB
testcase_47 AC 302 ms
15,580 KB
testcase_48 AC 296 ms
10,072 KB
testcase_49 WA -
testcase_50 AC 277 ms
10,140 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()))
s=(range(5))
w=list(itertools.permutations(s,3))
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[y][0]
            qqq=w[y][1]
            rrr=w[y][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