結果

問題 No.1792 科学の甲子園
ユーザー とりゐとりゐ
提出日時 2021-12-21 13:52:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 104 ms / 4,000 ms
コード長 2,568 bytes
コンパイル時間 372 ms
コンパイル使用メモリ 87,160 KB
実行使用メモリ 76,936 KB
最終ジャッジ日時 2023-08-17 18:41:49
合計ジャッジ時間 4,006 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
74,924 KB
testcase_01 AC 76 ms
75,928 KB
testcase_02 AC 79 ms
75,108 KB
testcase_03 AC 76 ms
75,116 KB
testcase_04 AC 77 ms
75,080 KB
testcase_05 AC 78 ms
74,832 KB
testcase_06 AC 76 ms
74,772 KB
testcase_07 AC 78 ms
75,040 KB
testcase_08 AC 84 ms
76,040 KB
testcase_09 AC 84 ms
76,020 KB
testcase_10 AC 81 ms
75,956 KB
testcase_11 AC 100 ms
76,556 KB
testcase_12 AC 92 ms
76,532 KB
testcase_13 AC 94 ms
76,504 KB
testcase_14 AC 104 ms
76,660 KB
testcase_15 AC 95 ms
76,572 KB
testcase_16 AC 77 ms
74,876 KB
testcase_17 AC 80 ms
75,872 KB
testcase_18 AC 78 ms
74,872 KB
testcase_19 AC 89 ms
76,420 KB
testcase_20 AC 98 ms
76,936 KB
testcase_21 AC 92 ms
76,584 KB
testcase_22 AC 99 ms
76,556 KB
testcase_23 AC 95 ms
76,544 KB
testcase_24 AC 77 ms
74,820 KB
testcase_25 AC 75 ms
74,848 KB
testcase_26 AC 76 ms
74,920 KB
testcase_27 AC 99 ms
76,536 KB
testcase_28 AC 101 ms
76,792 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,))]
y=[(0,), (0, 1), (0, 1, 2), (0, 1, 3), (0, 1, 4), (0, 1, 5), (0, 2), (0, 2, 3), (0, 2, 4), (0, 2, 5), (0, 3), (0, 3, 4), (0, 3, 5), (0, 4), (0, 4, 5), (0, 5), (1,), (1, 2), (1, 2, 3), (1, 2, 4), (1, 2, 5), (1, 3), (1, 3, 4), (1, 3, 5), (1, 4), (1, 4, 5), (1, 5), (2,), (2, 3), (2, 3, 4), (2, 3, 5), (2, 4), (2, 4, 5), (2, 5), (3,), (3, 4), (3, 4, 5), (3, 5), (4,), (4, 5), (5,)]

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

d={}
for s in y:
  mx=0
  for i in range(n):
    tmp=1
    for j in s:
      tmp*=a[i][j]
    mx=max(mx,tmp)
  d[s]=mx

ans=0
for s1,s2,s3,s4 in x:
  ans=max(ans,d[s1]*d[s2]*d[s3]*d[s4])

print(ans)
0