結果

問題 No.989 N×Mマス計算(K以上)
ユーザー _matumo__matumo_
提出日時 2020-02-26 16:25:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 254 ms / 2,000 ms
コード長 266 bytes
コンパイル時間 337 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 22,060 KB
最終ジャッジ日時 2024-04-21 16:28:23
合計ジャッジ時間 2,910 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
10,624 KB
testcase_01 AC 26 ms
10,752 KB
testcase_02 AC 26 ms
10,624 KB
testcase_03 AC 27 ms
10,624 KB
testcase_04 AC 26 ms
10,624 KB
testcase_05 AC 26 ms
10,752 KB
testcase_06 AC 27 ms
10,624 KB
testcase_07 AC 27 ms
10,624 KB
testcase_08 AC 27 ms
10,624 KB
testcase_09 AC 29 ms
10,624 KB
testcase_10 AC 182 ms
18,300 KB
testcase_11 AC 119 ms
18,256 KB
testcase_12 AC 185 ms
19,044 KB
testcase_13 AC 69 ms
15,648 KB
testcase_14 AC 254 ms
22,060 KB
testcase_15 AC 95 ms
13,696 KB
testcase_16 AC 159 ms
16,076 KB
testcase_17 AC 68 ms
15,640 KB
testcase_18 AC 156 ms
14,592 KB
testcase_19 AC 122 ms
18,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_left
N,M,K=map(int,input().split())
F,*pB=input().split()
pb=sorted(int(s) for s in pB)
pa=[int(input()) for _ in range(N)]
if F=='+':pz=[bisect_left(pb,K-A) for A in pa]
else 	:pz=[bisect_left(pb,(K+A-1)//A) for A in pa]
print(N*M-sum(pz))
0