結果

問題 No.2182 KODOKU Stone
ユーザー 👑 rin204rin204
提出日時 2023-12-29 15:15:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 466 bytes
コンパイル時間 254 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 114,732 KB
最終ジャッジ日時 2023-12-29 15:15:29
合計ジャッジ時間 18,377 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 37 ms
53,460 KB
testcase_02 AC 42 ms
59,344 KB
testcase_03 AC 35 ms
53,460 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 47 ms
61,596 KB
testcase_07 WA -
testcase_08 AC 48 ms
61,604 KB
testcase_09 AC 47 ms
61,600 KB
testcase_10 WA -
testcase_11 AC 833 ms
114,732 KB
testcase_12 AC 902 ms
113,804 KB
testcase_13 AC 127 ms
88,844 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 820 ms
114,732 KB
testcase_17 AC 118 ms
87,404 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 140 ms
76,664 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 99 ms
76,536 KB
testcase_26 AC 94 ms
76,664 KB
testcase_27 AC 93 ms
76,664 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 591 ms
98,940 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 37 ms
53,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
K = list(map(int, input().split()))
A = [[] for _ in range(n)]
for i in range(n):
    input()
    A[i] = list(map(int, input().split()))


def ok(x):
    C = [sum(a >= x for a in row) for row in A]
    C.sort()
    tf = False
    for c, k in zip(C, K):
        if tf:
            c += 1
        tf = c >= k
    return tf


l = 1
r = 1 << 30
while r - l > 1:
    mid = (l + r) // 2
    if ok(mid):
        l = mid
    else:
        r = mid

print(l)
0