結果

問題 No.989 N×Mマス計算(K以上)
ユーザー tktk_snsn
提出日時 2020-12-12 23:06:16
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 431 bytes
コンパイル時間 120 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 18,260 KB
最終ジャッジ日時 2024-09-19 22:32:11
合計ジャッジ時間 2,240 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
from operator import add, mul
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n, m, k = map(int, input().split())
op, *B = input().split()
B = list(map(int, B))
A = [int(input()) for _ in range(n)]

B.sort()

ans = 0
if op == "+":
    for a in A:
        ans += m - bisect.bisect_left(B, k - a)
    print(ans)
else:
    for a in A:
        ans += m - bisect.bisect_left(B, k // a)
    print(ans)
0