結果

問題 No.989 N×Mマス計算(K以上)
ユーザー rythem00359
提出日時 2020-08-27 17:31:13
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 323 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 19,124 KB
最終ジャッジ日時 2024-11-07 21:16:56
合計ジャッジ時間 3,219 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_left
n,m,k=map(int,input().split())
op,*b=input().split()
b=sorted(list(map(int,b)))
a=sorted(list(int(input()) for _ in range(n)))
ans=0
if op=='+':
    for an in a:
        ans+=m-bisect_left(b,max(k-an,0))
    print(ans)
else:
    for an in a:
        ans+=m-bisect_left(b,k//an)
    print(ans)
0