結果

問題 No.989 N×Mマス計算(K以上)
ユーザー komkompi
提出日時 2020-03-08 14:58:38
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 352 bytes
コンパイル時間 311 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 20,808 KB
最終ジャッジ日時 2024-11-07 05:15:10
合計ジャッジ時間 3,734 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect

N,M,K=map(int,input().split())
temp=list(input().split())
col=list(map(int,temp[1:]))
data=[]
for i in range(N):
    data.append(int(input()))

col.sort()
data.sort()

ans=N*M
for item in col:
    index=bisect.bisect_left(data,K-item if temp[0]=="+" else K//item)
    ans-=index if temp[0]=="+" else N-index
    #print(index)

print(ans)
0