結果
問題 | No.1361 [Zelkova 4th Tune *] QUADRUPLE-SEQUENCEの詩 |
ユーザー | convexineq |
提出日時 | 2021-01-23 17:06:34 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,188 bytes |
コンパイル時間 | 239 ms |
コンパイル使用メモリ | 82,192 KB |
実行使用メモリ | 188,824 KB |
最終ジャッジ日時 | 2024-06-10 00:49:17 |
合計ジャッジ時間 | 29,864 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 39 ms
52,736 KB |
testcase_01 | AC | 37 ms
52,736 KB |
testcase_02 | AC | 48 ms
60,672 KB |
testcase_03 | AC | 49 ms
61,696 KB |
testcase_04 | AC | 38 ms
52,992 KB |
testcase_05 | AC | 38 ms
52,608 KB |
testcase_06 | AC | 39 ms
53,248 KB |
testcase_07 | AC | 38 ms
52,736 KB |
testcase_08 | WA | - |
testcase_09 | AC | 62 ms
66,304 KB |
testcase_10 | AC | 79 ms
71,552 KB |
testcase_11 | AC | 80 ms
71,808 KB |
testcase_12 | WA | - |
testcase_13 | AC | 76 ms
71,296 KB |
testcase_14 | AC | 64 ms
67,584 KB |
testcase_15 | WA | - |
testcase_16 | AC | 64 ms
67,200 KB |
testcase_17 | AC | 75 ms
71,680 KB |
testcase_18 | AC | 131 ms
77,356 KB |
testcase_19 | AC | 105 ms
76,252 KB |
testcase_20 | AC | 135 ms
76,976 KB |
testcase_21 | AC | 102 ms
77,628 KB |
testcase_22 | WA | - |
testcase_23 | AC | 131 ms
78,416 KB |
testcase_24 | AC | 126 ms
79,240 KB |
testcase_25 | AC | 132 ms
78,692 KB |
testcase_26 | AC | 136 ms
78,124 KB |
testcase_27 | AC | 112 ms
76,632 KB |
testcase_28 | WA | - |
testcase_29 | AC | 393 ms
97,100 KB |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | AC | 247 ms
96,696 KB |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | WA | - |
testcase_41 | WA | - |
testcase_42 | WA | - |
testcase_43 | WA | - |
testcase_44 | WA | - |
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 | WA | - |
testcase_57 | WA | - |
testcase_58 | AC | 603 ms
129,892 KB |
testcase_59 | AC | 598 ms
129,900 KB |
testcase_60 | AC | 611 ms
129,936 KB |
testcase_61 | AC | 626 ms
129,360 KB |
testcase_62 | AC | 606 ms
129,368 KB |
testcase_63 | RE | - |
testcase_64 | RE | - |
testcase_65 | RE | - |
testcase_66 | RE | - |
testcase_67 | RE | - |
testcase_68 | RE | - |
testcase_69 | RE | - |
testcase_70 | AC | 40 ms
52,736 KB |
testcase_71 | AC | 38 ms
53,248 KB |
testcase_72 | AC | 36 ms
52,480 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-Lcd 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)