結果

問題 No.989 N×Mマス計算(K以上)
ユーザー tpynerivertpyneriver
提出日時 2020-02-14 21:34:28
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 420 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 173,516 KB
最終ジャッジ日時 2024-04-16 01:36:11
合計ジャッジ時間 4,376 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
57,472 KB
testcase_01 AC 43 ms
52,352 KB
testcase_02 AC 48 ms
54,912 KB
testcase_03 AC 49 ms
55,808 KB
testcase_04 AC 43 ms
51,968 KB
testcase_05 AC 48 ms
55,552 KB
testcase_06 AC 45 ms
53,120 KB
testcase_07 AC 48 ms
54,144 KB
testcase_08 AC 49 ms
55,424 KB
testcase_09 AC 50 ms
56,320 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline = sys.stdin.readline

N, M, K = map(int, readline().split())
op, *A = readline().strip().split()
A = [int(a) for a in A]
A.sort(reverse = True)
B = [int(readline()) for _ in range(N)]
res = 0
for b in B:
    ok = -1
    ng = M
    while abs(ok-ng)>1:
        med = (ok+ng)//2
        if eval(f'{A[med]}{op}{b}') >= K:
            ok = med
        else:
            ng = med
    res += 1+ok
print(res)
0