結果
問題 | No.1361 [Zelkova 4th Tune *] QUADRUPLE-SEQUENCEの詩 |
ユーザー | convexineq |
提出日時 | 2021-01-23 17:01:34 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,196 bytes |
コンパイル時間 | 281 ms |
コンパイル使用メモリ | 87,344 KB |
実行使用メモリ | 191,728 KB |
最終ジャッジ日時 | 2023-08-30 01:31:38 |
合計ジャッジ時間 | 40,115 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 74 ms
71,372 KB |
testcase_01 | AC | 73 ms
71,324 KB |
testcase_02 | AC | 85 ms
76,056 KB |
testcase_03 | WA | - |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | WA | - |
testcase_07 | RE | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | RE | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | RE | - |
testcase_24 | WA | - |
testcase_25 | RE | - |
testcase_26 | RE | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | RE | - |
testcase_31 | RE | - |
testcase_32 | WA | - |
testcase_33 | RE | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | WA | - |
testcase_41 | WA | - |
testcase_42 | RE | - |
testcase_43 | WA | - |
testcase_44 | RE | - |
testcase_45 | WA | - |
testcase_46 | WA | - |
testcase_47 | WA | - |
testcase_48 | WA | - |
testcase_49 | WA | - |
testcase_50 | WA | - |
testcase_51 | WA | - |
testcase_52 | WA | - |
testcase_53 | WA | - |
testcase_54 | WA | - |
testcase_55 | WA | - |
testcase_56 | RE | - |
testcase_57 | WA | - |
testcase_58 | AC | 692 ms
130,724 KB |
testcase_59 | AC | 690 ms
130,952 KB |
testcase_60 | AC | 689 ms
130,704 KB |
testcase_61 | AC | 686 ms
130,924 KB |
testcase_62 | RE | - |
testcase_63 | RE | - |
testcase_64 | RE | - |
testcase_65 | RE | - |
testcase_66 | RE | - |
testcase_67 | RE | - |
testcase_68 | RE | - |
testcase_69 | RE | - |
testcase_70 | AC | 72 ms
71,468 KB |
testcase_71 | AC | 70 ms
71,332 KB |
testcase_72 | AC | 70 ms
71,324 KB |
testcase_73 | RE | - |
ソースコード
K,L,M,N,s = map(int,input().split()) *a, = map(int,input().split()) *b, = map(int,input().split()) *c, = map(int,input().split()) *d, = map(int,input().split()) ab = [i*j for i in a for j in b] cd = [i*j for i in c for j in d] ab.sort() cd.sort() from bisect import bisect_left Lab = bisect_left(ab,0) Lcd = bisect_left(cd,0) ok = INF = 10**18 ng = -INF KL,MN = K*L, M*N while ok-ng > 1: mid = (ok+ng)//2 v = r = 0 for i in range(Lab)[::-1]: while r < Lcd and ab[i]*cd[r] > mid: r += 1 v += Lcd-r r = Lcd for i in range(Lab): while r < MN and ab[i]*cd[r] > mid: r += 1 v += MN-r r = 0 for i in range(Lab,KL): while r < Lcd and ab[i]*cd[r] <= mid: r += 1 v += r r = Lcd for i in range(Lab,KL)[::-1]: while r < MN and ab[i]*cd[r] <= mid: r += 1 v += r if v >= s: ok = mid else: ng = mid print(ok) cd = set(cd) for x in ab: if ok//x in cd: y = ok//x break r = [0]*4 for i in a: for j in b: if i*j==x: r[0],r[1] = i,j for i in c: for j in d: if i*j==y: r[2],r[3] = i,j print(*r)