結果

問題 No.989 N×Mマス計算(K以上)
ユーザー pluto77pluto77
提出日時 2020-02-26 16:15:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 368 ms / 2,000 ms
コード長 304 bytes
コンパイル時間 109 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 20,676 KB
最終ジャッジ日時 2024-04-21 16:28:12
合計ジャッジ時間 3,429 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
10,624 KB
testcase_01 AC 33 ms
10,752 KB
testcase_02 AC 33 ms
10,624 KB
testcase_03 AC 34 ms
10,752 KB
testcase_04 AC 34 ms
10,624 KB
testcase_05 AC 34 ms
10,752 KB
testcase_06 AC 34 ms
10,752 KB
testcase_07 AC 35 ms
10,624 KB
testcase_08 AC 34 ms
10,752 KB
testcase_09 AC 35 ms
10,752 KB
testcase_10 AC 229 ms
16,764 KB
testcase_11 AC 170 ms
17,488 KB
testcase_12 AC 266 ms
17,512 KB
testcase_13 AC 96 ms
15,636 KB
testcase_14 AC 368 ms
20,676 KB
testcase_15 AC 133 ms
13,056 KB
testcase_16 AC 237 ms
15,420 KB
testcase_17 AC 90 ms
15,504 KB
testcase_18 AC 192 ms
13,056 KB
testcase_19 AC 161 ms
17,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki989
import bisect
n,m,k=map(int,input().split())
op=input().split()
b=[]
for i in range(1,len(op)):
 b.append(int(op[i]))
b.sort()
a=[]
for i in range(n):
 a.append(int(input()))
res=n*m
for i in a:
 if op[0]=='+':
  res-=bisect.bisect_left(b,k-i)
 else:
  res-=bisect.bisect_left(b,k/i)
print(res)
0