結果

問題 No.989 N×Mマス計算(K以上)
ユーザー shimonohnishishimonohnishi
提出日時 2024-06-11 23:02:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 351 bytes
コンパイル時間 196 ms
コンパイル使用メモリ 82,460 KB
実行使用メモリ 90,420 KB
最終ジャッジ日時 2024-06-11 23:02:23
合計ジャッジ時間 2,992 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,116 KB
testcase_01 AC 38 ms
52,280 KB
testcase_02 AC 38 ms
52,780 KB
testcase_03 AC 37 ms
53,944 KB
testcase_04 AC 37 ms
53,244 KB
testcase_05 AC 38 ms
53,624 KB
testcase_06 WA -
testcase_07 AC 38 ms
52,692 KB
testcase_08 WA -
testcase_09 AC 38 ms
53,900 KB
testcase_10 AC 184 ms
83,304 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 96 ms
84,952 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 116 ms
81,492 KB
testcase_17 AC 95 ms
84,988 KB
testcase_18 AC 120 ms
77,372 KB
testcase_19 AC 125 ms
88,560 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_left
n, m, k = map(int, input().split())
op, *B = input().split()
B = list(map(int, B))
A = [int(input()) for _ in range(n)]

A.sort()
B.sort()
res = 0
if op == '+':
    for a in A:
        t = bisect_left(B, k - a)
        res += m - t
else:
    for a in A:
        t = bisect_left(B, k // a)
        res += m - t
print(res)
0