結果
問題 | No.1792 科学の甲子園 |
ユーザー | とりゐ |
提出日時 | 2021-12-21 13:39:48 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 121 ms / 4,000 ms |
コード長 | 2,447 bytes |
コンパイル時間 | 507 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 77,696 KB |
最終ジャッジ日時 | 2024-11-26 17:55:26 |
合計ジャッジ時間 | 3,672 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 45 ms
54,144 KB |
testcase_01 | AC | 47 ms
60,544 KB |
testcase_02 | AC | 41 ms
53,888 KB |
testcase_03 | AC | 45 ms
53,632 KB |
testcase_04 | AC | 43 ms
54,272 KB |
testcase_05 | AC | 42 ms
54,016 KB |
testcase_06 | AC | 42 ms
53,632 KB |
testcase_07 | AC | 44 ms
53,504 KB |
testcase_08 | AC | 71 ms
71,296 KB |
testcase_09 | AC | 86 ms
76,272 KB |
testcase_10 | AC | 48 ms
60,672 KB |
testcase_11 | AC | 113 ms
76,640 KB |
testcase_12 | AC | 106 ms
76,624 KB |
testcase_13 | AC | 115 ms
76,852 KB |
testcase_14 | AC | 121 ms
77,248 KB |
testcase_15 | AC | 105 ms
76,148 KB |
testcase_16 | AC | 43 ms
53,760 KB |
testcase_17 | AC | 48 ms
60,800 KB |
testcase_18 | AC | 48 ms
60,544 KB |
testcase_19 | AC | 106 ms
76,656 KB |
testcase_20 | AC | 118 ms
77,696 KB |
testcase_21 | AC | 106 ms
76,540 KB |
testcase_22 | AC | 118 ms
77,256 KB |
testcase_23 | AC | 109 ms
76,488 KB |
testcase_24 | AC | 42 ms
53,248 KB |
testcase_25 | AC | 42 ms
53,632 KB |
testcase_26 | AC | 42 ms
53,632 KB |
testcase_27 | AC | 107 ms
76,516 KB |
testcase_28 | AC | 119 ms
77,488 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,))] 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)