結果
| 問題 | No.989 N×Mマス計算(K以上) |
| コンテスト | |
| ユーザー |
rythem00359
|
| 提出日時 | 2020-08-27 17:37:15 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 216 ms / 2,000 ms |
| + 106µs | |
| コード長 | 331 bytes |
| 記録 | |
| コンパイル時間 | 58 ms |
| コンパイル使用メモリ | 14,464 KB |
| 実行使用メモリ | 19,608 KB |
| 最終ジャッジ日時 | 2026-10-19 19:35:43 |
| 合計ジャッジ時間 | 4,057 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
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