結果
問題 | No.1792 科学の甲子園 |
ユーザー | とりゐ |
提出日時 | 2021-12-21 13:52:44 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 78 ms / 4,000 ms |
コード長 | 2,568 bytes |
コンパイル時間 | 360 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 72,320 KB |
最終ジャッジ日時 | 2024-05-05 01:31:12 |
合計ジャッジ時間 | 2,719 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 40 ms
58,112 KB |
testcase_01 | AC | 43 ms
60,032 KB |
testcase_02 | AC | 40 ms
58,368 KB |
testcase_03 | AC | 41 ms
57,728 KB |
testcase_04 | AC | 41 ms
58,112 KB |
testcase_05 | AC | 41 ms
57,984 KB |
testcase_06 | AC | 42 ms
58,112 KB |
testcase_07 | AC | 43 ms
57,984 KB |
testcase_08 | AC | 48 ms
61,952 KB |
testcase_09 | AC | 53 ms
63,360 KB |
testcase_10 | AC | 44 ms
60,288 KB |
testcase_11 | AC | 69 ms
69,760 KB |
testcase_12 | AC | 60 ms
66,816 KB |
testcase_13 | AC | 67 ms
68,736 KB |
testcase_14 | AC | 77 ms
72,320 KB |
testcase_15 | AC | 62 ms
66,816 KB |
testcase_16 | AC | 41 ms
57,984 KB |
testcase_17 | AC | 44 ms
60,160 KB |
testcase_18 | AC | 42 ms
58,112 KB |
testcase_19 | AC | 61 ms
66,816 KB |
testcase_20 | AC | 74 ms
71,936 KB |
testcase_21 | AC | 67 ms
66,944 KB |
testcase_22 | AC | 69 ms
68,992 KB |
testcase_23 | AC | 62 ms
67,200 KB |
testcase_24 | AC | 40 ms
57,984 KB |
testcase_25 | AC | 44 ms
57,984 KB |
testcase_26 | AC | 43 ms
58,112 KB |
testcase_27 | AC | 66 ms
69,504 KB |
testcase_28 | AC | 78 ms
71,296 KB |
ソースコード
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)