結果

問題 No.989 N×Mマス計算(K以上)
ユーザー s_shoheis_shohei
提出日時 2020-04-11 15:50:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 191 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 81,612 KB
実行使用メモリ 90,348 KB
最終ジャッジ日時 2023-10-19 07:16:26
合計ジャッジ時間 3,242 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,352 KB
testcase_01 AC 40 ms
53,352 KB
testcase_02 AC 41 ms
53,352 KB
testcase_03 AC 41 ms
53,352 KB
testcase_04 AC 39 ms
53,352 KB
testcase_05 AC 40 ms
53,352 KB
testcase_06 AC 40 ms
53,352 KB
testcase_07 AC 41 ms
53,352 KB
testcase_08 AC 41 ms
53,352 KB
testcase_09 AC 40 ms
53,352 KB
testcase_10 AC 151 ms
84,292 KB
testcase_11 AC 147 ms
88,344 KB
testcase_12 AC 149 ms
86,600 KB
testcase_13 AC 119 ms
85,492 KB
testcase_14 AC 191 ms
90,348 KB
testcase_15 AC 106 ms
77,768 KB
testcase_16 AC 126 ms
81,428 KB
testcase_17 AC 124 ms
85,488 KB
testcase_18 AC 121 ms
76,820 KB
testcase_19 AC 158 ms
88,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,k = map(int, input().split())
tmp = list(map(str, input().split()))
a=[int(input()) for i in range(n)]

op=tmp[0]
b=[]
for num in tmp[1:]:
    b.append(int(num))

a.sort()
b.sort()

ans=0
import bisect
for i in b:
    if op=="*":
        thr=k/i
    else:
        thr=k-i

    ind = bisect.bisect_left(a,thr)
    ans+= (len(a) - ind)

print(ans)
0