結果

問題 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  
実行時間 255 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 10,620 KB
実行使用メモリ 19,668 KB
最終ジャッジ日時 2023-08-01 19:36:15
合計ジャッジ時間 3,538 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,964 KB
testcase_01 AC 13 ms
7,964 KB
testcase_02 AC 16 ms
7,972 KB
testcase_03 AC 16 ms
7,864 KB
testcase_04 AC 16 ms
8,044 KB
testcase_05 AC 17 ms
7,916 KB
testcase_06 AC 15 ms
7,868 KB
testcase_07 AC 15 ms
7,884 KB
testcase_08 AC 15 ms
7,972 KB
testcase_09 AC 14 ms
7,920 KB
testcase_10 AC 166 ms
14,404 KB
testcase_11 AC 113 ms
16,272 KB
testcase_12 AC 193 ms
16,112 KB
testcase_13 AC 56 ms
14,092 KB
testcase_14 AC 255 ms
19,668 KB
testcase_15 AC 89 ms
10,696 KB
testcase_16 AC 166 ms
13,132 KB
testcase_17 AC 56 ms
14,080 KB
testcase_18 AC 140 ms
10,488 KB
testcase_19 AC 109 ms
16,792 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