結果

問題 No.1361 [Zelkova 4th Tune *] QUADRUPLE-SEQUENCEの詩
ユーザー 👑 KazunKazun
提出日時 2020-09-06 22:24:24
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 503 bytes
コンパイル時間 487 ms
コンパイル使用メモリ 86,856 KB
実行使用メモリ 837,404 KB
最終ジャッジ日時 2023-08-27 16:08:15
合計ジャッジ時間 9,583 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
71,416 KB
testcase_01 AC 64 ms
71,164 KB
testcase_02 AC 71 ms
75,592 KB
testcase_03 AC 62 ms
71,452 KB
testcase_04 AC 63 ms
71,308 KB
testcase_05 AC 64 ms
71,264 KB
testcase_06 AC 65 ms
71,468 KB
testcase_07 AC 64 ms
71,404 KB
testcase_08 AC 286 ms
160,844 KB
testcase_09 AC 113 ms
92,820 KB
testcase_10 AC 414 ms
212,060 KB
testcase_11 AC 219 ms
133,928 KB
testcase_12 AC 170 ms
121,964 KB
testcase_13 AC 231 ms
142,032 KB
testcase_14 AC 86 ms
82,140 KB
testcase_15 AC 907 ms
249,044 KB
testcase_16 AC 311 ms
173,956 KB
testcase_17 AC 310 ms
172,408 KB
testcase_18 MLE -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
testcase_53 -- -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
testcase_60 -- -
testcase_61 -- -
testcase_62 -- -
testcase_63 -- -
testcase_64 -- -
testcase_65 -- -
testcase_66 -- -
testcase_67 -- -
testcase_68 -- -
testcase_69 -- -
testcase_70 -- -
testcase_71 -- -
testcase_72 -- -
testcase_73 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0