結果

問題 No.989 N×Mマス計算(K以上)
ユーザー tter4
提出日時 2020-02-15 00:17:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 379 bytes
コンパイル時間 199 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 92,544 KB
最終ジャッジ日時 2024-10-06 13:32:59
合計ジャッジ時間 2,646 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect

n, m, k = map(int, input().split())
opb = list(map(str, input().split()))
op = opb[0]
b = [int(x) for x in opb[1:]]
a = [int(input()) for _ in range(n)]

b.sort()

if op == '+':
    ans = 0
    for i in range(n):
        ans += m - bisect.bisect_left(b, k-a[i])
else:
    ans = 0
    for i in range(n):
        ans += m - bisect.bisect_left(b, k//a[i])

print(ans)
0