結果

問題 No.989 N×Mマス計算(K以上)
ユーザー freecss00freecss00
提出日時 2020-02-14 22:08:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 356 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 27,356 KB
最終ジャッジ日時 2024-04-16 02:12:11
合計ジャッジ時間 4,056 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
16,128 KB
testcase_01 AC 29 ms
10,624 KB
testcase_02 AC 30 ms
10,752 KB
testcase_03 AC 30 ms
10,752 KB
testcase_04 AC 30 ms
10,624 KB
testcase_05 AC 30 ms
10,624 KB
testcase_06 AC 30 ms
10,624 KB
testcase_07 AC 30 ms
10,752 KB
testcase_08 AC 29 ms
10,752 KB
testcase_09 AC 29 ms
10,624 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect

n, m, k = map(int, input().split())
line = input().split()
op = line[0]
B = list(map(int, line[1:]))
A = [int(input()) for _ in range(n)]
A.sort()
B.sort()

f = (lambda a,b: a+b) if op == '+' else (lambda a,b: a*b)
ans = 0
for i in range(n):
    a = A[i]
    C = [f(a,b) for b in B]
    x = bisect.bisect_left(C, k)
    ans += m-x
print(ans)
0