結果

問題 No.989 N×Mマス計算(K以上)
ユーザー 12354865271235486527
提出日時 2020-02-25 14:45:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 340 ms / 2,000 ms
コード長 290 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 18,244 KB
最終ジャッジ日時 2024-04-21 13:36:09
合計ジャッジ時間 3,355 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
10,624 KB
testcase_01 AC 36 ms
10,752 KB
testcase_02 AC 35 ms
10,752 KB
testcase_03 AC 33 ms
10,752 KB
testcase_04 AC 32 ms
10,624 KB
testcase_05 AC 33 ms
10,752 KB
testcase_06 AC 35 ms
10,752 KB
testcase_07 AC 32 ms
10,624 KB
testcase_08 AC 33 ms
10,752 KB
testcase_09 AC 33 ms
10,752 KB
testcase_10 AC 211 ms
15,092 KB
testcase_11 AC 154 ms
17,228 KB
testcase_12 AC 243 ms
16,360 KB
testcase_13 AC 84 ms
15,632 KB
testcase_14 AC 340 ms
18,244 KB
testcase_15 AC 122 ms
12,544 KB
testcase_16 AC 210 ms
13,888 KB
testcase_17 AC 78 ms
15,508 KB
testcase_18 AC 177 ms
11,392 KB
testcase_19 AC 144 ms
17,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_left
N, M, K = map(int, input().split())
op, *B = input().split()
B = sorted(int(x) for x in B)
ans = N * M
for a in (int(input()) for _ in range(N)):
    if op == '+':
        ans -= bisect_left(B, K - a)
    else:
        ans -= bisect_left(B, K / a)
print(ans)
0