結果

問題 No.989 N×Mマス計算(K以上)
ユーザー maspy
提出日時 2020-02-27 16:24:45
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 592 ms / 2,000 ms
コード長 484 bytes
コンパイル時間 124 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 50,068 KB
最終ジャッジ日時 2024-10-13 15:58:20
合計ジャッジ時間 11,605 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
# %%
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


# %%
import numpy as np

# %%
N, M, K = map(int, readline().split())
op = read(1).decode()
BA = np.array(read().split(), np.int64)

# %%
B = BA[:M]
A = BA[M:]

# %%
A.sort()
B.sort()

# %%
if op == '+':
    answer = np.sum(N - np.searchsorted(A, (K - B)))
else:
    answer = np.sum(N - np.searchsorted(A, (K + B - 1) // B))
print(answer)
0