結果
| 問題 | No.989 N×Mマス計算(K以上) |
| ユーザー |
💕💖💞
|
| 提出日時 | 2020-04-10 13:18:39 |
| 言語 | Python3 (3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 549 ms / 2,000 ms |
| + 198µs | |
| コード長 | 461 bytes |
| 記録 | |
| コンパイル時間 | 52 ms |
| コンパイル使用メモリ | 14,720 KB |
| 実行使用メモリ | 41,108 KB |
| 最終ジャッジ日時 | 2026-10-19 16:55:59 |
| 合計ジャッジ時間 | 11,545 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
import numpy as np
import bisect
n, m, k = map(int, input().split())
x1 = list(input().split())
op = x1.pop(0)
b_arr = list(map(lambda x:int(x), x1))
b_arr.sort()
a_arr = [int(input()) for i in range(n)]
a_arr.sort()
cnt = 0
if op == '+':
for b in b_arr:
s = k-b
idx = bisect.bisect_left(a_arr, s)
cnt += n -idx
else:
for b in b_arr:
s = k/b
idx = bisect.bisect_left(a_arr, s)
cnt += n -idx
print(cnt)
💕💖💞