結果
問題 |
No.1045 直方体大学
|
ユーザー |
![]() |
提出日時 | 2020-05-01 23:19:52 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 501 bytes |
コンパイル時間 | 516 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-12-25 14:23:49 |
合計ジャッジ時間 | 1,535 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | RE * 17 |
ソースコード
t(input()) l=[sorted(list(map(int,input().split()))) for i in range(n)] l.sort(key=lambda x:x[1],reverse=True) x=[] for i in l: x+=i x.sort() xi=dict() xin=dict() for i,j in enumerate(x): xi[j]=i xin[i]=j dp=[[0]*(n*3+1) for i in range(n*3+1)] def dpi(a,b,c): return max([max(i[xi[b]+1:]) for i in dp[:xi[a]+1]]+[max(i) for i in dp[xi[a]+1:]])+c def f(a,b,c): dp[a][b],dp[a][c],dp[b][c]=dpi(a,b,c),dpi(a,c,b),dpi(b,c,a) for a,b,c in l: f(a,b,c) print(max([max(i) for i in dp]))