結果

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

ソースコード

diff #

import bisect
N, M, K = map(int,input().split())
B = input().split()
C = sorted([int(B[l]) for l in range(1,M+1)])
ans = 0
if B[0] == "+":
    for k in range(N):
        A = int(input())
        ans += M-bisect.bisect_left(C,K-A)
else:
    for k in range(N):
        A = int(input())
        ans += M-bisect.bisect_left(C,K/A)

print(ans)
0