結果

問題 No.1792 科学の甲子園
ユーザー ramdosramdos
提出日時 2021-11-24 13:23:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 904 bytes
コンパイル時間 405 ms
コンパイル使用メモリ 11,008 KB
実行使用メモリ 10,548 KB
最終ジャッジ日時 2023-10-13 19:37:07
合計ジャッジ時間 13,978 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 374 ms
10,444 KB
testcase_01 AC 493 ms
10,480 KB
testcase_02 AC 206 ms
10,520 KB
testcase_03 AC 290 ms
10,448 KB
testcase_04 AC 407 ms
10,404 KB
testcase_05 AC 295 ms
10,416 KB
testcase_06 AC 254 ms
10,404 KB
testcase_07 AC 210 ms
10,452 KB
testcase_08 AC 1,318 ms
10,448 KB
testcase_09 AC 2,917 ms
10,536 KB
testcase_10 AC 490 ms
10,548 KB
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

Q=4096
pat=[[[0 for i in range(6)] for j in range(4)] for k in range(Q)]
for i in range(4):
  for j in range(4):
    for k in range(4):
      for l in range(4):
        for m in range(4):
          for n in range(4):
            pid=i*1024+j*256+k*64+l*16+m*4+n;
            pat[pid][i][0]=1;
            pat[pid][j][1]=1;
            pat[pid][k][2]=1;
            pat[pid][l][3]=1;
            pat[pid][m][4]=1;
            pat[pid][n][5]=1;
N=int(input())
T=[list(map(int,input().split())) for j in range(N)]
gmx=0
for ctr in range(Q):
  ft=1
  for p in range(4):
    pmx=0
    for i in range(N):
      pmx=max(pmx,
          max(1,pat[ctr][p][0]*T[i][0])*
          max(1,pat[ctr][p][1]*T[i][1])*
          max(1,pat[ctr][p][2]*T[i][2])*
          max(1,pat[ctr][p][3]*T[i][3])*
          max(1,pat[ctr][p][4]*T[i][4])*
          max(1,pat[ctr][p][5]*T[i][5]))
    ft*=pmx
  gmx=max(ft,gmx)
print(gmx)
0