結果

問題 No.1792 科学の甲子園
ユーザー 👑 KazunKazun
提出日時 2021-12-24 03:56:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 407 ms / 4,000 ms
コード長 378 bytes
コンパイル時間 241 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 76,788 KB
最終ジャッジ日時 2024-05-05 01:31:50
合計ジャッジ時間 6,159 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
69,760 KB
testcase_01 AC 69 ms
72,192 KB
testcase_02 AC 63 ms
66,944 KB
testcase_03 AC 64 ms
68,352 KB
testcase_04 AC 67 ms
70,400 KB
testcase_05 AC 63 ms
67,840 KB
testcase_06 AC 63 ms
67,584 KB
testcase_07 AC 63 ms
66,688 KB
testcase_08 AC 81 ms
76,032 KB
testcase_09 AC 86 ms
75,776 KB
testcase_10 AC 69 ms
71,936 KB
testcase_11 AC 340 ms
76,416 KB
testcase_12 AC 249 ms
76,544 KB
testcase_13 AC 326 ms
76,288 KB
testcase_14 AC 405 ms
76,788 KB
testcase_15 AC 272 ms
76,032 KB
testcase_16 AC 60 ms
67,968 KB
testcase_17 AC 64 ms
72,064 KB
testcase_18 AC 69 ms
70,784 KB
testcase_19 AC 279 ms
76,672 KB
testcase_20 AC 400 ms
76,664 KB
testcase_21 AC 227 ms
76,160 KB
testcase_22 AC 325 ms
76,468 KB
testcase_23 AC 272 ms
76,160 KB
testcase_24 AC 53 ms
65,536 KB
testcase_25 AC 57 ms
67,584 KB
testcase_26 AC 56 ms
67,328 KB
testcase_27 AC 326 ms
76,588 KB
testcase_28 AC 407 ms
76,672 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