結果
| 問題 |
No.989 N×Mマス計算(K以上)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-20 00:38:06 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 423 bytes |
| コンパイル時間 | 248 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 22,260 KB |
| 最終ジャッジ日時 | 2024-10-12 10:56:34 |
| 合計ジャッジ時間 | 3,487 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 WA * 6 |
ソースコード
from bisect import *
from math import floor
N,M,K = map(int,input().split())
l = list(map(str,input().split()))
op = l[0]
B = [0]*M
for i in range(1,M+1):
B[i-1] = int(l[i])
A = [int(input()) for _ in range(N)]
A,B = sorted(A),sorted(B)
ans = 0
if op == "+":
for i in range(N):
b = bisect_left(B,K-A[i])
ans += (M-b)
else:
for i in range(N):
b = bisect_left(B,floor(K/A[i]))
ans += (M-b)
print(ans)