結果

問題 No.989 N×Mマス計算(K以上)
ユーザー 👑 H20H20
提出日時 2021-07-15 11:16:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 192 ms / 2,000 ms
コード長 351 bytes
コンパイル時間 360 ms
コンパイル使用メモリ 87,024 KB
実行使用メモリ 90,480 KB
最終ジャッジ日時 2023-09-17 16:39:39
合計ジャッジ時間 3,839 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,176 KB
testcase_01 AC 76 ms
70,916 KB
testcase_02 AC 79 ms
71,048 KB
testcase_03 AC 76 ms
71,048 KB
testcase_04 AC 76 ms
71,056 KB
testcase_05 AC 76 ms
70,956 KB
testcase_06 AC 75 ms
71,212 KB
testcase_07 AC 76 ms
71,288 KB
testcase_08 AC 75 ms
70,952 KB
testcase_09 AC 75 ms
70,872 KB
testcase_10 AC 170 ms
83,980 KB
testcase_11 AC 160 ms
89,100 KB
testcase_12 AC 170 ms
86,728 KB
testcase_13 AC 129 ms
85,332 KB
testcase_14 AC 192 ms
90,480 KB
testcase_15 AC 136 ms
78,928 KB
testcase_16 AC 154 ms
81,828 KB
testcase_17 AC 131 ms
85,164 KB
testcase_18 AC 154 ms
79,952 KB
testcase_19 AC 158 ms
89,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
N,M,K = map(int,input().split())
B = list(input().split())
OP = B[0]
B = list(map(int, B[1:]))
A = []
for _ in range(N):
    A.append(int(input()))
A.sort()
B.sort()
ANS = 0
if OP=='+':
    for a in A:
        ANS += M-bisect.bisect_left(B,K-a)
else:
    SB = sum(B)
    for a in A:
        ANS += M-bisect.bisect_left(B,K/a)
print(ANS)
0