結果

問題 No.989 N×Mマス計算(K以上)
ユーザー DrDrpilotDrDrpilot
提出日時 2022-01-30 17:32:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 322 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 11,008 KB
実行使用メモリ 18,748 KB
最終ジャッジ日時 2023-09-02 01:41:59
合計ジャッジ時間 3,652 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,072 KB
testcase_01 AC 16 ms
8,004 KB
testcase_02 AC 17 ms
7,984 KB
testcase_03 AC 17 ms
7,980 KB
testcase_04 AC 16 ms
7,960 KB
testcase_05 AC 16 ms
7,960 KB
testcase_06 AC 16 ms
7,936 KB
testcase_07 AC 16 ms
8,008 KB
testcase_08 AC 16 ms
8,032 KB
testcase_09 AC 16 ms
7,964 KB
testcase_10 AC 197 ms
14,748 KB
testcase_11 AC 136 ms
15,840 KB
testcase_12 AC 223 ms
16,312 KB
testcase_13 AC 74 ms
13,700 KB
testcase_14 AC 322 ms
18,748 KB
testcase_15 AC 101 ms
10,856 KB
testcase_16 AC 187 ms
13,124 KB
testcase_17 AC 70 ms
13,628 KB
testcase_18 AC 156 ms
10,660 KB
testcase_19 AC 131 ms
16,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
n,m,k=map(int,input().split())
l=list(map(str,input().split()))
a=[int(input()) for _ in range(n)]
b=[]
for i in range(1,m+1):
    b.append(int(l[i]))
a.sort();b.sort()
ans=0
if l[0]=='*':
    for i in a:
        ans+=m-bisect.bisect_left(b,k/i)
else:
    for i in a:
        ans+=m-bisect.bisect_left(b,k-i)
print(ans)
0