結果
問題 |
No.989 N×Mマス計算(K以上)
|
ユーザー |
![]() |
提出日時 | 2020-03-08 15:13:52 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 347 ms / 2,000 ms |
コード長 | 330 bytes |
コンパイル時間 | 146 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 20,688 KB |
最終ジャッジ日時 | 2024-11-07 05:50:46 |
合計ジャッジ時間 | 3,277 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
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)