結果

問題 No.1361 [Zelkova 4th Tune *] QUADRUPLE-SEQUENCEの詩
ユーザー 👑 KazunKazun
提出日時 2020-09-07 00:35:28
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 588 bytes
コンパイル時間 436 ms
コンパイル使用メモリ 86,992 KB
実行使用メモリ 843,188 KB
最終ジャッジ日時 2023-08-27 16:07:32
合計ジャッジ時間 12,053 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 MLE -
testcase_01 AC 71 ms
71,400 KB
testcase_02 AC 78 ms
75,556 KB
testcase_03 AC 71 ms
71,156 KB
testcase_04 AC 72 ms
71,004 KB
testcase_05 AC 71 ms
71,300 KB
testcase_06 AC 71 ms
71,152 KB
testcase_07 AC 72 ms
71,072 KB
testcase_08 AC 314 ms
161,016 KB
testcase_09 AC 128 ms
92,964 KB
testcase_10 AC 453 ms
212,308 KB
testcase_11 AC 246 ms
133,968 KB
testcase_12 AC 190 ms
122,040 KB
testcase_13 AC 251 ms
141,940 KB
testcase_14 AC 97 ms
82,264 KB
testcase_15 AC 974 ms
248,932 KB
testcase_16 AC 346 ms
173,500 KB
testcase_17 AC 340 ms
172,656 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)
    b=B[0]

    for a in A:
        if a==0:
            if x==0:
                return (0,b)
        elif (x%a==0) and (x//a in G):
            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