結果

問題 No.989 N×Mマス計算(K以上)
ユーザー tter4tter4
提出日時 2020-02-15 00:17:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 379 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 92,544 KB
最終ジャッジ日時 2024-04-16 03:02:37
合計ジャッジ時間 2,575 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
51,840 KB
testcase_01 AC 43 ms
51,840 KB
testcase_02 AC 46 ms
52,352 KB
testcase_03 AC 46 ms
52,096 KB
testcase_04 AC 46 ms
52,224 KB
testcase_05 AC 42 ms
52,224 KB
testcase_06 WA -
testcase_07 AC 42 ms
52,352 KB
testcase_08 WA -
testcase_09 AC 42 ms
52,480 KB
testcase_10 AC 142 ms
85,000 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 109 ms
86,400 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 123 ms
82,432 KB
testcase_17 AC 112 ms
86,784 KB
testcase_18 AC 121 ms
77,696 KB
testcase_19 AC 133 ms
90,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect

n, m, k = map(int, input().split())
opb = list(map(str, input().split()))
op = opb[0]
b = [int(x) for x in opb[1:]]
a = [int(input()) for _ in range(n)]

b.sort()

if op == '+':
    ans = 0
    for i in range(n):
        ans += m - bisect.bisect_left(b, k-a[i])
else:
    ans = 0
    for i in range(n):
        ans += m - bisect.bisect_left(b, k//a[i])

print(ans)
0