結果

問題 No.989 N×Mマス計算(K以上)
ユーザー kimiyuki
提出日時 2020-02-14 22:11:24
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 461 bytes
コンパイル時間 241 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 18,136 KB
最終ジャッジ日時 2024-10-06 12:15:18
合計ジャッジ時間 3,159 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import bisect
def main():
    h, w, k = map(int, input().split())
    op, *b = input().split()
    b = list(map(int, b))
    a = [ int(input()) for _ in range(h) ]
    a.sort()
    b.sort()
    c = 0
    if op == '+':
        for a_y in a:
            c += w - bisect.bisect_left(b, k - a_y)
    elif op == '*':
        for a_y in a:
            c += w - bisect.bisect_left(b, k // a_y)
    print(c)
if __name__ == "__main__":
    main()
0