結果

問題 No.1792 科学の甲子園
ユーザー とりゐとりゐ
提出日時 2021-12-21 13:39:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 137 ms / 4,000 ms
コード長 2,447 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 77,184 KB
最終ジャッジ日時 2024-05-05 01:31:02
合計ジャッジ時間 3,441 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
54,016 KB
testcase_01 AC 48 ms
60,544 KB
testcase_02 AC 45 ms
53,632 KB
testcase_03 AC 48 ms
53,632 KB
testcase_04 AC 49 ms
54,016 KB
testcase_05 AC 49 ms
54,016 KB
testcase_06 AC 46 ms
54,016 KB
testcase_07 AC 45 ms
53,760 KB
testcase_08 AC 83 ms
71,424 KB
testcase_09 AC 92 ms
75,776 KB
testcase_10 AC 48 ms
60,672 KB
testcase_11 AC 114 ms
76,140 KB
testcase_12 AC 107 ms
76,892 KB
testcase_13 AC 118 ms
76,988 KB
testcase_14 AC 137 ms
77,184 KB
testcase_15 AC 120 ms
76,400 KB
testcase_16 AC 42 ms
53,504 KB
testcase_17 AC 51 ms
60,544 KB
testcase_18 AC 52 ms
60,672 KB
testcase_19 AC 112 ms
76,140 KB
testcase_20 AC 120 ms
76,928 KB
testcase_21 AC 110 ms
76,672 KB
testcase_22 AC 118 ms
77,060 KB
testcase_23 AC 110 ms
76,356 KB
testcase_24 AC 42 ms
53,120 KB
testcase_25 AC 42 ms
53,632 KB
testcase_26 AC 43 ms
53,760 KB
testcase_27 AC 108 ms
76,280 KB
testcase_28 AC 123 ms
76,928 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x=[((0,), (1,), (2,), (3, 4, 5)),((0,), (1,), (2, 3), (4, 5)),((0,), (1,), (2, 3, 4), (5,)),((0,), (1,), (2, 3, 5), (4,)),((0,), (1,), (2, 4), (3, 5)),((0,), (1,), (2, 4, 5), (3,)),((0,), (1,), (2, 5), (3, 4)),((0,), (1, 2), (3,), (4, 5)),((0,), (1, 2), (3, 4), (5,)),((0,), (1, 2), (3, 5), (4,)),((0,), (1, 2, 3), (4,), (5,)),((0,), (1, 2, 4), (3,), (5,)),((0,), (1, 2, 5), (3,), (4,)),((0,), (1, 3), (2,), (4, 5)),((0,), (1, 3), (2, 4), (5,)),((0,), (1, 3), (2, 5), (4,)),((0,), (1, 3, 4), (2,), (5,)),((0,), (1, 3, 5), (2,), (4,)),((0,), (1, 4), (2,), (3, 5)),((0,), (1, 4), (2, 3), (5,)),((0,), (1, 4), (2, 5), (3,)),((0,), (1, 4, 5), (2,), (3,)),((0,), (1, 5), (2,), (3, 4)),((0,), (1, 5), (2, 3), (4,)),((0,), (1, 5), (2, 4), (3,)),((0, 1), (2,), (3,), (4, 5)),((0, 1), (2,), (3, 4), (5,)),((0, 1), (2,), (3, 5), (4,)),((0, 1), (2, 3), (4,), (5,)),((0, 1), (2, 4), (3,), (5,)),((0, 1), (2, 5), (3,), (4,)),((0, 1, 2), (3,), (4,), (5,)),((0, 1, 3), (2,), (4,), (5,)),((0, 1, 4), (2,), (3,), (5,)),((0, 1, 5), (2,), (3,), (4,)),((0, 2), (1,), (3,), (4, 5)),((0, 2), (1,), (3, 4), (5,)),((0, 2), (1,), (3, 5), (4,)),((0, 2), (1, 3), (4,), (5,)),((0, 2), (1, 4), (3,), (5,)),((0, 2), (1, 5), (3,), (4,)),((0, 2, 3), (1,), (4,), (5,)),((0, 2, 4), (1,), (3,), (5,)),((0, 2, 5), (1,), (3,), (4,)),((0, 3), (1,), (2,), (4, 5)),((0, 3), (1,), (2, 4), (5,)),((0, 3), (1,), (2, 5), (4,)),((0, 3), (1, 2), (4,), (5,)),((0, 3), (1, 4), (2,), (5,)),((0, 3), (1, 5), (2,), (4,)),((0, 3, 4), (1,), (2,), (5,)),((0, 3, 5), (1,), (2,), (4,)),((0, 4), (1,), (2,), (3, 5)),((0, 4), (1,), (2, 3), (5,)),((0, 4), (1,), (2, 5), (3,)),((0, 4), (1, 2), (3,), (5,)),((0, 4), (1, 3), (2,), (5,)),((0, 4), (1, 5), (2,), (3,)),((0, 4, 5), (1,), (2,), (3,)),((0, 5), (1,), (2,), (3, 4)),((0, 5), (1,), (2, 3), (4,)),((0, 5), (1,), (2, 4), (3,)),((0, 5), (1, 2), (3,), (4,)),((0, 5), (1, 3), (2,), (4,)),((0, 5), (1, 4), (2,), (3,))]

n=int(input())
a=[0]*n
for i in range(n):
  a[i]=list(map(int,input().split()))

ans=0
for s1,s2,s3,s4 in x:
  mx1,mx2,mx3,mx4=0,0,0,0
  for i in range(n):

    tmp1=1
    for j in s1:
      tmp1*=a[i][j]
    mx1=max(tmp1,mx1)

    tmp2=1
    for j in s2:
      tmp2*=a[i][j]
    mx2=max(tmp2,mx2)

    tmp3=1
    for j in s3:
      tmp3*=a[i][j]
    mx3=max(tmp3,mx3)

    tmp4=1
    for j in s4:
      tmp4*=a[i][j]
    mx4=max(tmp4,mx4)

  ans=max(ans,mx1*mx2*mx3*mx4)
  #print(s1,mx1,s2,mx2,s3,mx3,s4,mx4,mx1*mx2*mx3*mx4)

print(ans)
0