結果

問題 No.989 N×Mマス計算(K以上)
ユーザー komkompikomkompi
提出日時 2020-03-08 14:22:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 305 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 20,808 KB
最終ジャッジ日時 2024-04-24 18:22:12
合計ジャッジ時間 3,536 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,752 KB
testcase_01 AC 30 ms
10,752 KB
testcase_02 AC 31 ms
10,752 KB
testcase_03 AC 30 ms
10,752 KB
testcase_04 AC 33 ms
10,752 KB
testcase_05 AC 31 ms
10,752 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 30 ms
10,752 KB
testcase_10 AC 231 ms
16,564 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 107 ms
16,148 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 193 ms
15,432 KB
testcase_17 AC 106 ms
16,140 KB
testcase_18 AC 171 ms
13,312 KB
testcase_19 AC 181 ms
18,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect

N,M,K=map(int,input().split())
temp=list(input().split())
col=list(map(int,temp[1:]))
data=[]
for i in range(N):
    data.append(int(input()))

col.sort()
data.sort()

ans=N*M
for item in col:
    index=bisect.bisect_left(data,K-item if temp[0]=="+" else K//item)
    ans-=index

print(ans)
0