結果

問題 No.989 N×Mマス計算(K以上)
ユーザー 👑 rin204rin204
提出日時 2020-08-17 00:25:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 315 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 20,936 KB
最終ジャッジ日時 2024-04-19 18:37:02
合計ジャッジ時間 3,083 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
10,880 KB
testcase_01 AC 27 ms
10,752 KB
testcase_02 AC 25 ms
10,752 KB
testcase_03 AC 26 ms
10,752 KB
testcase_04 AC 25 ms
10,752 KB
testcase_05 AC 26 ms
10,752 KB
testcase_06 AC 26 ms
10,880 KB
testcase_07 AC 26 ms
10,880 KB
testcase_08 AC 25 ms
10,752 KB
testcase_09 AC 25 ms
10,752 KB
testcase_10 AC 185 ms
16,892 KB
testcase_11 AC 134 ms
18,388 KB
testcase_12 AC 221 ms
18,156 KB
testcase_13 AC 74 ms
16,152 KB
testcase_14 AC 315 ms
20,936 KB
testcase_15 AC 109 ms
13,056 KB
testcase_16 AC 198 ms
15,432 KB
testcase_17 AC 69 ms
16,148 KB
testcase_18 AC 166 ms
13,184 KB
testcase_19 AC 125 ms
18,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_left

n, m, k = map(int, input().split())
opb = list(input().split())
ope = opb[0]
blst = [int(b) for b in opb[1:]]
alst = [int(input()) for _ in range(n)]
blst.sort()
ans = 0
for a in alst:
    if ope == "+":
        pos = k - a
    else:
        pos = k / a
    ans += m - bisect_left(blst, pos)
print(ans)
0