結果
| 問題 |
No.989 N×Mマス計算(K以上)
|
| コンテスト | |
| ユーザー |
rythem00359
|
| 提出日時 | 2020-08-27 17:37:15 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 300 ms / 2,000 ms |
| コード長 | 331 bytes |
| コンパイル時間 | 109 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 19,308 KB |
| 最終ジャッジ日時 | 2024-11-07 21:25:15 |
| 合計ジャッジ時間 | 2,941 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
from bisect import bisect_left
from math import ceil
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))
else:
for an in a:
ans+=m-bisect_left(b,ceil(k/an))
print(ans)
rythem00359