結果

問題 No.1792 科学の甲子園
ユーザー 👑 KazunKazun
提出日時 2021-12-24 03:56:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 432 ms / 4,000 ms
コード長 378 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 87,208 KB
実行使用メモリ 77,696 KB
最終ジャッジ日時 2023-08-17 18:42:07
合計ジャッジ時間 7,176 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
76,752 KB
testcase_01 AC 93 ms
76,760 KB
testcase_02 AC 88 ms
76,504 KB
testcase_03 AC 91 ms
76,764 KB
testcase_04 AC 91 ms
76,656 KB
testcase_05 AC 91 ms
76,936 KB
testcase_06 AC 90 ms
76,524 KB
testcase_07 AC 88 ms
76,656 KB
testcase_08 AC 101 ms
77,000 KB
testcase_09 AC 116 ms
76,992 KB
testcase_10 AC 90 ms
76,864 KB
testcase_11 AC 353 ms
77,412 KB
testcase_12 AC 275 ms
77,456 KB
testcase_13 AC 337 ms
77,628 KB
testcase_14 AC 432 ms
77,696 KB
testcase_15 AC 285 ms
77,436 KB
testcase_16 AC 90 ms
76,520 KB
testcase_17 AC 91 ms
76,652 KB
testcase_18 AC 92 ms
76,348 KB
testcase_19 AC 287 ms
77,376 KB
testcase_20 AC 426 ms
77,532 KB
testcase_21 AC 243 ms
77,280 KB
testcase_22 AC 358 ms
77,592 KB
testcase_23 AC 293 ms
77,640 KB
testcase_24 AC 82 ms
76,880 KB
testcase_25 AC 87 ms
76,808 KB
testcase_26 AC 89 ms
76,480 KB
testcase_27 AC 357 ms
77,524 KB
testcase_28 AC 415 ms
77,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import product

N=int(input())

S=[]
for i in range(N):
    S.append(list(map(int,input().split())))

X=0
for A in product(range(4),repeat=6):
    T=[1,1,1,1]

    for i in range(N):
        V=[1,1,1,1]
        for k in range(6):
            V[A[k]]*=S[i][k]

        for j in range(4):
            T[j]=max(T[j],V[j])

    X=max(X,T[0]*T[1]*T[2]*T[3])

print(X)
0