結果

問題 No.989 N×Mマス計算(K以上)
コンテスト
ユーザー komkompi
提出日時 2020-03-08 15:13:52
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 176 ms / 2,000 ms
+ 225µs
コード長 330 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 54 ms
コンパイル使用メモリ 15,104 KB
実行使用メモリ 21,032 KB
最終ジャッジ日時 2026-09-20 03:03:04
合計ジャッジ時間 2,851 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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 -int(-K//item))
    ans-=index
    #print(index)

print(ans)
0