結果
問題 | No.1361 [Zelkova 4th Tune *] QUADRUPLE-SEQUENCEの詩 |
ユーザー |
👑 ![]() |
提出日時 | 2020-09-06 22:24:24 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 503 bytes |
コンパイル時間 | 336 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 937,596 KB |
最終ジャッジ日時 | 2024-12-27 18:22:22 |
合計ジャッジ時間 | 166,015 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 RE * 3 TLE * 10 MLE * 50 |
ソースコード
def h(A,B,x):G=set(B)for a in A:if x%a==0 and x//a in B:return (a,x//a)return None#Greedy解法K,L,M,N,P=map(int,input().split())A=list(map(int,input().split()))B=list(map(int,input().split()))C=list(map(int,input().split()))D=list(map(int,input().split()))E=[a*b*c*d for a in A for b in B for c in C for d in D]E.sort()J=E[P-1]U=[a*b for a in A for b in B]V=[c*d for c in C for d in D]p,q=h(U,V,J)a,b=h(A,B,p)c,d=h(C,D,q)print(J)print(a,b,c,d)