結果

問題 No.989 N×Mマス計算(K以上)
ユーザー mlihua09mlihua09
提出日時 2020-09-01 18:42:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 184 ms / 2,000 ms
コード長 395 bytes
コンパイル時間 330 ms
コンパイル使用メモリ 87,124 KB
実行使用メモリ 89,788 KB
最終ジャッジ日時 2023-08-12 18:06:00
合計ジャッジ時間 4,813 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,240 KB
testcase_01 AC 74 ms
71,280 KB
testcase_02 AC 76 ms
71,016 KB
testcase_03 AC 78 ms
71,244 KB
testcase_04 AC 73 ms
71,244 KB
testcase_05 AC 75 ms
71,516 KB
testcase_06 AC 72 ms
71,268 KB
testcase_07 AC 73 ms
71,240 KB
testcase_08 AC 72 ms
71,176 KB
testcase_09 AC 71 ms
71,576 KB
testcase_10 AC 184 ms
84,604 KB
testcase_11 AC 147 ms
88,408 KB
testcase_12 AC 153 ms
86,696 KB
testcase_13 AC 124 ms
85,944 KB
testcase_14 AC 171 ms
89,788 KB
testcase_15 AC 125 ms
79,192 KB
testcase_16 AC 136 ms
82,604 KB
testcase_17 AC 130 ms
85,836 KB
testcase_18 AC 140 ms
77,832 KB
testcase_19 AC 143 ms
88,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


N, M, K = map(int, input().split())

from bisect import bisect_left

B = input().split()
op = B[0]
B = list(map(int, B[1:]))
B.sort()
ans = 0
if op == '+':
    for i in range(N):
        a = int(input())
        
        ans += M - bisect_left(B, K - a)
    
else:
    for i in range(N):
        
        a = int(input())
        ans += M - bisect_left(B, (K - 1) // a + 1)
        
print(ans)
0